[SLOVED] How to manager opendialog to Programs patch ?
Hi all...!
I'm working with OpenFileDialog and just have a question.
Some on here know how to manager OpenFileDialog autostart to Dir "\ProgramData\Microsoft\Windows\Start Menu\Programs" of Windows hard disk ?
Please tell me how to do it
Thanks a lot..!
Re: How to manager opendialog ?
Set the InitialDirectory property. MSDN is your friend ;)
Re: How to manager opendialog ?
Have you read the docs? In case your Google foo is week here is a direct link to appropriate field you need to set.
Re: How to manager opendialog ?
Thanks BigEd781,STLDude for answer.!
I already read it but in my computer windows system in H: Disk , other computer in C: , D: ....
So how i can manager it to right Windows disk ?
My computer now , files i need in "H:\ProgramData\Microsoft\Windows\Start Menu\Programs"
I can set it , but other ?
How can set it always go to "\ProgramData\Microsoft\Windows\Start Menu\Programs" on Windows disk ?
Thanks again..!
Re: How to manager opendialog ?
You do need to get your Google foo in order, all this information is readily available. Here it's a start and this page lists all possible Folders you can get path to it.
Re: How to manager opendialog ?
Problem sloved!
here my code :
string sResult = "";
string sStatup = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + @"\Microsoft\Windows\Start Menu\Programs";
OpenFileDialog filedlg = new OpenFileDialog();
filedlg.InitialDirectory = sStatup;
if (filedlg.ShowDialog() == DialogResult.OK)
sResult = filedlg.FileName;
Again thanks BigEd781,STLDude for help!
Tom.