ShowOpenDlg Example for Visual Basic

    Dim RasterFileDlg As New LEADRasterDlgFile_U
    Dim nRet As Integer
    
    RasterFileDlg.DialogTitle = "LEADTOOLS Open dialog box"
    RasterFileDlg.InitialDir = "d:\temp\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
        LEAD1.Load RasterFileDlg.FileName, 0, RasterFileDlg.PageNumber, 1
    End If