[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Dialogs' (#lcl)

TFileDialog.InitialDir

Contains the initial directory displayed when the dialog is opened.

Declaration

Source position: dialogs.pp line 177

published property TFileDialog.InitialDir : string
  read FInitialDir
  write FInitialDir;

Description

InitialDir is a String property which contains the name for the initial directory displayed when the dialog is opened. When omitted, or set to an empty string, the directory for the application executable is used.

Assign the value in InitialDir prior to calling the Execute method to display the dialog.

For the windows platform, there are some CLSID values which can be used in InitialDir. They are GUIDs representing locations like 'This PC' or 'Network' used the Windows file explorer. The following values are know to work in InitialDir:

Opens 'This PC'
'::{20D04FE0-3AEA-1069-A2D8-08002B30309D}'
Opens Network
'::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}'

There are others which may, or may not, work for your Windows version:

List of Windows 11 CLSID Key (GUID) Shortcuts

See also

TCommonDialog.Execute

  

Displays the dialog and captures the result.


Version 3.2 Generated 2024-02-25 Home