Hi All,
I am using the OpenFileDialog control. I want to open the a specific Location, Let say "D:\Softwares\\Storage Location\\". I am setting the InitialDirectoryto thatlocation, which i am reading registry to get the location. My problem is:
1. When i execute the code from VS it works fine but when i deploy the application on the machine it always opens "My Documents" folder, untill and unless i browse the specific location once when open dialog is open. From then onwards the dialog opens the specific location instead of "My Documents".
The code i m using is as given below:
openFileToView.InitialDirectory = CSProperties.CurrentStorageDir;
openFileToView.Filter = CSProperties.XML_FILE_FILTER;
openFileToView.Multiselect = false;
if
(openFileToView.ShowDialog() == DialogResult.OK)
{
//Some Logic.
}
// CSProperties.CurrentStorageDir is the location read from the registry
Can somewhen suggest me a solution to this problem.