OpenFileDialog.InitialDirectory
property · OpenFileDialog · cAlgo.API Since 5.1
DesktopCLICloud
Gets or sets the initial directory that is displayed by a file dialog.
Environment behaviour
CLI — not supported. No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored.
Cloud — not supported. No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored.
Definition
public string InitialDirectory {get; set;}
openFileDialog.InitialDirectory: str
Returns string
Examples
var openFileDialog = new OpenFileDialog { InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) };
openFileDialog.ShowDialog();
from System import Environment
openFileDialog = OpenFileDialog()
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
openFileDialog.ShowDialog()