ShowSaveDlg example for Delphi

procedure TForm1.ShowSaveDlg1Click(Sender: TObject); 
var
   nRet: L_INT; 
   strMsg: String;   
begin
   LEADDlgFile1.DialogTitle:= 'Save a File'; 
   LEADDlgFile1.MaxFileSize:= 0; 
   LEADDlgFile1.MaxFileTitleSize:= 0; 
   LEADDlgFile1.DlgFileFlags:= 0; 
   LEADDlgFile1.InitialDir:= 'C:\';         
   LEADDlgFile1.SaveMulti:= MULTIPAGE_OPERATION_OVERWRITE; 
   LEADDlgFile1.DlgFlags:= DLG_SAVE_AUTOPROCESS +
                           DLG_SAVE_SHOW_FILEOPTIONS_PROGRESSIVE     +
                           DLG_SAVE_SHOW_FILEOPTIONS_MULTIPAGE       +
                           DLG_SAVE_SHOW_FILEOPTIONS_STAMP           +
                           DLG_SAVE_SHOW_FILEOPTIONS_QFACTOR         +
                           DLG_SAVE_SHOW_FILEOPTIONS_J2KOPTIONS      +
                           DLG_SAVE_SHOW_FILEOPTIONS_BASICJ2KOPTIONS; 
   LEADDlgFile1.LEADImage:= LEADImage1; 
   nRet:= LEADDlgFile1.ShowSaveDlg ( Self ); 
   if ( nRet = SUCCESS_DLG_OK ) then
   begin
      strMsg:= 'FileName: ' + LEADDlgFile1.FileName +#13; 
      strMsg:= strMsg + 'FileTitle: ' + LEADDlgFile1.FileTitle +#13; 
      strMsg:= strMsg + 'SaveBitsPerPixel: ' + IntToStr(LEADDlgFile1.SaveBitsPerPixel)+#13; 
      strMsg:= strMsg + 'SaveFormat: ' + IntToStr(LEADDlgFile1.SaveFormat)+#13; 
      strMsg:= strMsg + 'SaveQFactor: ' + IntToStr(LEADDlgFile1.SaveQFactor)+#13; 
      strMsg:= strMsg + 'SaveMulti: ' + IntToStr(LEADDlgFile1.SaveMulti)+#13; 
      strMsg:= strMsg + 'SavePasses: ' + IntToStr(LEADDlgFile1.SavePasses)+#13; 
      strMsg:= strMsg + 'SaveWithStamp: '; 
      if ( LEADDlgFile1.SaveWithStamp ) then
         strMsg:= strMsg + 'True'+#13
      else
         strMsg:= strMsg + 'False'+#13; 
      strMsg:= strMsg + 'SaveStampBits: ' + IntToStr(LEADDlgFile1.SaveStampBits)+#13; 
      strMsg:= strMsg + 'SaveStampWidth: ' + IntToStr(LEADDlgFile1.SaveStampWidth)+#13; 
      strMsg:= strMsg + ' SaveStampHeight: ' + IntToStr(LEADDlgFile1.SaveStampHeight)+#13; 
      strMsg:= strMsg + 'SaveInterlaced: '; 
      if ( LEADDlgFile1.SaveInterlaced  ) then
         strMsg:= strMsg + 'True'
      else
         strMsg:= strMsg + 'False'; 

      ShowMessage(strMsg); 
   end; 
end;