OptionsFileType Example for Visual Basic

    Dim RasterFileDlg As New LEADRasterDlgFile_U
   RasterFileDlg.DialogTitle = "LEADTOOLS Open dialog box"
   RasterFileDlg.InitialDir = "c:\images"
   RasterFileDlg.FileDlgFlags = 0
   RasterFileDlg.EnableShowPreview = True
   RasterFileDlg.EnableShowLoadOptions = True
   RasterFileDlg.LoadRotated = False
   RasterFileDlg.LoadCompressed = False
   RasterFileDlg.LoadPasses = 0
   
   RasterFileDlg.UIFlags = OPEN_SHOW_PROGRESSIVE Or _
                           OPEN_SHOW_MULTIPAGE Or _
                           OPEN_SHOW_LOADROTATED Or _
                           OPEN_SHOW_LOADCOMPRESSED Or _
                           OPEN_SHOW_FILEINFO Or _
                           OPEN_SHOW_PREVIEW Or _
                           OPEN_SHOW_DELPAGE Or _
                           OPEN_SHOW_PDFOPTIONS Or _
                           OPEN_SHOW_RASTEROPTIONS Or _
                           OPEN_SHOW_VECTOROPTIONS Or _
                           OPEN_SHOW_LOADOPTIONS Or _
                           OPEN_VIEWTOTALPAGES Or _
                           OPEN_LOADBITMAP Or _
                           OPEN_GENERATETHUMBNAIL

   RasterFileDlg.Bitmap = LEAD1.Bitmap
   nRet = RasterFileDlg.ShowOpenDlg(hWnd)
   Dim i As Integer
   If (nRet = 0 And RasterFileDlg.DialogStatus = DLG_OK) Then
   
      Select Case RasterFileDlg.OptionsFileType
      Case FILE_PCD:
         Text1.Text = CStr(RasterFileDlg.PCDResolution)
      Case FILE_RAS_PDF, _
            FILE_RAS_PDF_G3_1D, _
            FILE_RAS_PDF_G3_2D, _
            FILE_RAS_PDF_G4, _
            FILE_RAS_PDF_JPEG, _
            FILE_RAS_PDF_JPEG_422, _
            FILE_RAS_PDF_JPEG_411:
         
         Text1.Text = CStr(RasterFileDlg.PDFXResolution)
         Text2.Text = CStr(RasterFileDlg.PDFYResolution)
         Text3.Text = CStr(RasterFileDlg.PDFDisplayDepth)
         Text4.Text = CStr(RasterFileDlg.PDFTextAlpha)
         Text5.Text = CStr(RasterFileDlg.PDFGraphicsAlpha)
      
      Case FILE_FPX, _
            FILE_FPX_SINGLE_COLOR, _
            FILE_FPX_JPEG, _
            FILE_FPX_JPEG_QFACTOR, _
            FILE_CMW, _
            FILE_JBIG, _
            FILE_JP2, _
            FILE_J2K:
       
         Text1.Text = CStr(RasterFileDlg.RasterXResolution)
         Text2.Text = CStr(RasterFileDlg.RasterYResolution)
      
      Case FILE_WMF, _
           FILE_EMF:
         
         Text1.Text = CStr(RasterFileDlg.WMFXResolution)
         Text2.Text = CStr(RasterFileDlg.WMFYResolution)
        
      Case FILE_DWF, _
            FILE_CGM, _
            FILE_PCD, _
            FILE_VECTOR_DUMP, _
            FILE_DRW, _
            FILE_INTERGRAPH_VECTOR, _
            FILE_GERBER:
         
         Text1.Text = CStr(RasterFileDlg.VectorViewportWidth)
         Text2.Text = CStr(RasterFileDlg.VectorViewportHeight)
         Text3.Text = CStr(RasterFileDlg.VectorViewportMode)
         Text4.Text = RasterFileDlg.VectorFont
         
      Case FILE_DXF, _
           FILE_DWG:
      
         Text1.Text = CStr(RasterFileDlg.DXFViewportWidth)
         Text2.Text = CStr(RasterFileDlg.DXFViewportHeight)
         Text3.Text = CStr(RasterFileDlg.DXFViewportMode)
         Text4.Text = RasterFileDlg.DXFFont
         Text5.Text = CStr(RasterFileDlg.DXFAutoCADColorScheme)
               
      Case FILE_PLT:
         Text1.Text = CStr(RasterFileDlg.PLTViewportWidth)
         Text2.Text = CStr(RasterFileDlg.PLTViewportHeight)
         Text3.Text = CStr(RasterFileDlg.PLTViewportMode)
         Text4.Text = RasterFileDlg.PLTFont
         Text5.Text = "[ " + CStr(RasterFileDlg.PLTPenWidth(0))
         Text6.Text = "[ " + CStr(RasterFileDlg.PLTPenColor(0))
      
         For i = 1 To 7
            Text5.Text = Text5.Text + ", " + CStr(RasterFileDlg.PLTPenWidth(i))
            Text6.Text = Text6.Text + ", " + CStr(RasterFileDlg.PLTPenColor(i))
         Next i
            
         Text5.Text = Text5.Text + " ]"
         Text6.Text = Text6.Text + " ]"
      End Select
   End If