ShowOpenDlg Example for Visual Basic
Dim RasterFileDlg As New LEADRasterDlgFile
Dim RasterIO As New LEADRasterIO
Dim nRet As Integer
Private Sub Open_Click()
RasterFileDlg.DialogTitle = "LEADTOOLS Open dialog box"
RasterFileDlg.InitialDir = "c:\images"
RasterFileDlg.FileDlgFlags = 0
RasterFileDlg.EnableShowPreview = True
RasterFileDlg.EnableShowLoadOptions = False
RasterFileDlg.LoadRotated = False
RasterFileDlg.LoadCompressed = False
RasterFileDlg.LoadPasses = 0
RasterFileDlg.EnableShowLoadOptions = False
RasterFileDlg.Filter = "ALL|*.*|LEAD|*.cmp|JPEG|*.JPG"
RasterFileDlg.UIFlags = OPEN_SHOW_PROGRESSIVE Or _
OPEN_SHOW_MULTIPAGE Or _
OPEN_SHOW_LOADROTATED Or _
OPEN_SHOW_LOADCOMPRESSED Or _
OPEN_SHOW_LOADOPTIONS Or _
OPEN_SHOW_FILEINFO Or _
OPEN_SHOW_PREVIEW Or _
OPEN_SHOW_DELPAGE Or _
OPEN_VIEWTOTALPAGES
nRet = RasterFileDlg.ShowOpenDlg(hWnd)
If (nRet = 0 And RasterFileDlg.DialogStatus = DLG_OK) Then
RasterIO.Load LEADRasterView1.Raster, RasterFileDlg.FileName, 0, RasterFileDlg.PageNumber, 1
End If
End Sub