ShowGetDirectoryDlg example for Delphi

procedure TForm1.ShowGetDirectoryDlg1Click(Sender: TObject); 
var
   nRet: L_INT; 
begin
   LEADDlgFile1.Directory:= 'c:\images\'; 
   LEADDlgFile1.Filter:= 'ALL|*.*|LEAD|*.cmp|JPEG|*.JPG'; 
   LEADDlgFile1.FilterIndex:= 1; 
   LEADDlgFile1.DialogTitle:= 'Select a Directory Please'; 

   LEADDlgFile1.ShowHelpButton:= True; 
   LEADDlgFile1.EnableMethodErrors:= False; 
   LEADDlgFile1.LEADDlgService:= LEADDlgService1; 

   nRet:= LEADDlgFile1.ShowGetDirectoryDlg ( Self ); 
   if ( nRet = SUCCESS_DLG_OK  ) then
   begin
      ShowMessage ( LEADDlgFile1.Directory ); 
   end; 
end; 

procedure TForm1.LEADDlgFile1DlgHelp (uDialogID: Cardinal); 
begin
   Case ( uDialogID ) of
      DLG_HELP_GETDIRECTORY: 
         ShowMessage( 'Help from GetDirectory dialog' ); 

      DLG_HELP_FILESASSOCIATION: 
         ShowMessage( 'Help from FilesAssociation dialog' ); 

      DLG_HELP_OPEN: 
         ShowMessage( 'Help from Open dialog' ); 

      DLG_HELP_SAVE: 
         ShowMessage( 'Help from Save dialog' ); 

      DLG_HELP_FILECONVERSION: 
         ShowMessage( 'Help from FileConversion dialog' ); 

      DLG_HELP_PRINTPREVIEW: 
         ShowMessage( 'Help from PrintPreview dialog' ); 

      DLG_HELP_PRINTSTITCHEDIMAGES: 
         ShowMessage( 'Help from PrintStitchedImages dialog' ); 
   end; 
end;