OptionsFileType example for Delphi

procedure TForm1.ShowOpenDlg2Click(Sender: TObject); 
var
   i: L_INT; 
   nRet: L_INT; 
begin
   LEADDlgFile1.DialogTitle:= 'LEADTOOLS Open dialog box'; 
   LEADDlgFile1.InitialDir:= 'c:\images'; 
   LEADDlgFile1.DlgFileFlags:= 0; 
   LEADDlgFile1.PreviewEnabled:= True; 
   LEADDlgFile1.ShowLoadOptions:= True; 
   LEADDlgFile1.LoadRotated:= False; 
   LEADDlgFile1.LoadCompressed:= False; 
   LEADDlgFile1.LoadPasses:= 0; 
   LEADDlgFile1.MaxFileSize:= 0; 
   LEADDlgFile1.MaxFileTitleSize:= 0; 

   LEADDlgFile1.DlgFlags:= DLG_OPEN_SHOW_PROGRESSIVE   +
                           DLG_OPEN_SHOW_MULTIPAGE   +
                           DLG_OPEN_SHOW_LOADROTATED   +
                           DLG_OPEN_SHOW_LOADCOMPRESSED  +
                           DLG_OPEN_SHOW_FILEINFO   +
                           DLG_OPEN_SHOW_PREVIEW   +
                           DLG_OPEN_SHOW_DELPAGE   +
                           DLG_OPEN_SHOW_PDFOPTIONS   +
                           DLG_OPEN_SHOW_RASTEROPTIONS   +
                           DLG_OPEN_SHOW_VECTOROPTIONS   +
                           DLG_OPEN_SHOW_LOADOPTIONS     +
                           DLG_OPEN_VIEWTOTALPAGES   +
                           DLG_OPEN_LOADBITMAP   +
                           DLG_OPEN_GENERATETHUMBNAIL; 

   LEADDlgFile1.LEADImage:= LEADImage1; 
   nRet:= LEADDlgFile1.ShowOpenDlg ( Self ); 
   if ( nRet = SUCCESS_DLG_OK ) then
   begin
      Case ( LEADDlgFile1.OptionsFileType ) of
         FILE_PCD: 
         begin
            Edit1.Text:= IntToStr ( LEADDlgFile1.PCDResolution ); 
         end; 

         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: 
         begin
            Edit1.Text:= IntToStr ( LEADDlgFile1.PDFXResolution ); 
            Edit2.Text:= IntToStr ( LEADDlgFile1.PDFYResolution ); 
            Edit3.Text:= IntToStr ( LEADDlgFile1.PDFDisplayDepth ); 
            Edit4.Text:= IntToStr ( LEADDlgFile1.PDFTextAlpha ); 
            Edit5.Text:= IntToStr ( LEADDlgFile1.PDFGraphicsAlpha ); 
         end; 

         FILE_FPX, 
         FILE_FPX_SINGLE_COLOR, 
         FILE_FPX_JPEG, 
         FILE_FPX_JPEG_QFACTOR, 
         FILE_CMW, 
         FILE_JBIG, 
         FILE_JP2, 
         FILE_J2K: 
         begin
            Edit1.Text:= IntToStr ( LEADDlgFile1.RASTERMISCXResolution ); 
            Edit2.Text:= IntToStr ( LEADDlgFile1.RASTERMISCYResolution ); 
         end; 

         FILE_WMF, 
         FILE_EMF: 
         begin
            Edit1.Text:= IntToStr ( LEADDlgFile1.METAFILEXResolution ); 
            Edit2.Text:= IntToStr ( LEADDlgFile1.METAFILEYResolution ); 
         end; 

         FILE_DWF, 
         FILE_CGM, 
         FILE_CMX, 
         FILE_PCL, 
         FILE_VECTOR_DUMP, 
         FILE_PCT, 
         FILE_DRW, 
         FILE_INTERGRAPH_VECTOR, 
         FILE_GERBER, 
         FILE_SHP, 
         FILE_SVG, 
         FILE_VWPG: 
         begin
            Edit1.Text:= IntToStr ( LEADDlgFile1.VECTORMISCViewportWidth ); 
            Edit2.Text:= IntToStr ( LEADDlgFile1.VECTORMISCViewportHeight ); 
            Edit3.Text:= IntToStr ( LEADDlgFile1.VECTORMISCViewportMode ); 
            Edit4.Text:= LEADDlgFile1.VECTORMISCFont
         end; 

         FILE_DXF, 
         FILE_DXF_R13, 
         FILE_DWG: 
         begin
            Edit1.Text:= IntToStr ( LEADDlgFile1.DXFViewportWidth ); 
            Edit2.Text:= IntToStr ( LEADDlgFile1.DXFViewportHeight ); 
            Edit3.Text:= IntToStr ( LEADDlgFile1.DXFViewportMode ); 
            Edit4.Text:= LEADDlgFile1.DXFFont
            Edit5.Text:= IntToStr ( LEADDlgFile1.DXFAutoCADColorScheme ); 
         end; 

         FILE_PLT: 
         begin
            Edit1.Text:= IntToStr ( LEADDlgFile1.PLTViewportWidth ); 
            Edit2.Text:= IntToStr ( LEADDlgFile1.PLTViewportHeight ); 
            Edit3.Text:= IntToStr ( LEADDlgFile1.PLTViewportMode ); 
            Edit4.Text:= LEADDlgFile1.PLTFont; 
            Edit5.Text:= '[ ' + IntToStr ( LEADDlgFile1.PLTPenWidth [0] ); 
              Edit6.Text:= '[ ' + IntToStr ( LEADDlgFile1.PLTPenColor [0] ); 
            for i:= 1 to 7 do
            begin
               Edit5.Text:= Edit5.Text + ', ' + IntToStr ( LEADDlgFile1.PLTPenWidth [i] ); 
               Edit6.Text:= Edit6.Text + ', ' + IntToStr ( LEADDlgFile1.PLTPenColor [i] ); 
            end; 
            Edit5.Text:= Edit5.Text + ' ]'; 
              Edit6.Text:= Edit6.Text + ' ]'; 
         end; 

         Else
         begin
            Edit1.Text:= 'None'; 
         end; 
      end; 
   end; 
end;