Mega Code Archive

 
Categories / Delphi / API
 

Executing the explorer find file dialog

Question: How can I execute the Windows Explorer Find File Dialog Box? Answer: The following example demonstrates using DDE to execute Explorer's find file dialog. The example opens the dialog in the Directory "C:\Download". procedure TForm1.Button1Click(Sender: TObject); begin with TDDEClientConv.Create(Self) do begin ConnectMode := ddeManual; ServiceApplication := 'explorer.exe'; SetLink( 'Folders', 'AppProperties'); OpenLink; ExecuteMacro('[FindFolder(, C:\DOWNLOAD)]', False); CloseLink; Free; end; end;