TypeIndex Example for Visual Basic
Private Sub FileSave_Click()
Dim RasterIO As New LEADRasterIO
Dim RasterKrnDlg As New LEADRasterDlgKrn
Dim RasterFileDlg As New LEADRasterDlgFile
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.TypeIndex = FF_SAVE_LEAD
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 = LEADRasterView1.Raster
RasterFileDlg.ShowSaveDlg (hWnd)
End Sub