G
Greg
I'm a bit confused by this - when I set the InitialDiretory of an
OpenFileDialog to be a subfolder within the same folder as the app, the
file dialog does not initially display the folder - instead it shows
the last used folder (this persists after closing the app).
However, if I use a different path (e.g. "C:\\") then every time the
dialog is shown, it starts at the correct directory every time.
Is there something special about an app path that a file dialog doesn't
like, or is my syntax wrong???
OpenFileDialog objOpenDlg = new OpenFileDialog();
objOpenDlg.InitialDirectory = Application.ExecutablePath + @"\Games\";
if (objOpenDlg.ShowDialog() == DialogResult.OK)
{
//do some stuff here
}
It doesn't seem to make any difference whether the app is a debug or
release mode, and whether it is run from the IDE or not.
Any thoughts???
Greg.
OpenFileDialog to be a subfolder within the same folder as the app, the
file dialog does not initially display the folder - instead it shows
the last used folder (this persists after closing the app).
However, if I use a different path (e.g. "C:\\") then every time the
dialog is shown, it starts at the correct directory every time.
Is there something special about an app path that a file dialog doesn't
like, or is my syntax wrong???
OpenFileDialog objOpenDlg = new OpenFileDialog();
objOpenDlg.InitialDirectory = Application.ExecutablePath + @"\Games\";
if (objOpenDlg.ShowDialog() == DialogResult.OK)
{
//do some stuff here
}
It doesn't seem to make any difference whether the app is a debug or
release mode, and whether it is run from the IDE or not.
Any thoughts???
Greg.