FileFormatsCount Example for Visual Basic

     Dim RasterFileDlg As New LEADRasterDlgFile_U

    RasterFileDlg.DialogTitle = "Save a File"
   
    RasterFileDlg.InitialDir = "C:\"
    RasterFileDlg.FileFormatsCount = 2

    RasterFileDlg.FileFormats(0).Format = FF_SAVE_LEAD
    RasterFileDlg.FileFormats(0).BitsPerPixelCount = 1
    RasterFileDlg.FileFormats(0).BitsPerPixelFormat(0) = 24
    RasterFileDlg.FileFormats(0).SubFormat(0) = FF_SAVE_SUB_CMP_NONPROGRESSIVE + FF_SAVE_SUB_CMP_PROGRESSIVE

    RasterFileDlg.FileFormats(1).Format = FF_SAVE_TIFF
    RasterFileDlg.FileFormats(1).BitsPerPixelCount = 1
    RasterFileDlg.FileFormats(1).BitsPerPixelFormat(0) = 24
    RasterFileDlg.FileFormats(1).SubFormat(0) = FF_SAVE_SUB_TIFF1_CCITT + FF_SAVE_SUB_TIFF1_CCITT_G3_1D + FF_SAVE_SUB_TIFF1_CCITT_G3_2D + FF_SAVE_SUB_TIFF1_CCITT_G4 + _
                                                FF_SAVE_SUB_TIFF1_UNCOMPRESSEDRGB + FF_SAVE_SUB_TIFF1_RLERGB + _
                                                FF_SAVE_SUB_TIFF1_LZWRGB + FF_SAVE_SUB_TIFF1_JBIG

    RasterFileDlg.UIFlags = SAVE_AUTOPROCESS + _
                            SAVE_SHOW_FILEOPTIONS_PROGRESSIVE + _
                            SAVE_SHOW_FILEOPTIONS_MULTIPAGE + _
                            SAVE_SHOW_FILEOPTIONS_STAMP + _
                            SAVE_SHOW_FILEOPTIONS_QFACTOR + _
                            SAVE_SHOW_FILEOPTIONS_J2KOPTIONS + _
                            SAVE_SHOW_FILEOPTIONS_BASICJ2KOPTIONS
    RasterFileDlg.Bitmap = LEAD1.Bitmap
    RasterFileDlg.ShowSaveDlg (hWnd)