B barbara_dave May 10, 2005 #1 Hi, all, I like to know to how to set fileopendialog inital directory to "MyComputer". Thanks
? =?ISO-8859-1?Q?Thorsten_D=F6rfler?= May 11, 2005 #2 I like to know to how to set fileopendialog inital directory to "MyComputer". Click to expand... Use the CLSID prefixed by two colons: Const STR_MYCOMPUTER_CLSID As String = _ "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" ' My Computer OpenFileDialog1.InitialDirectory = "::" & STR_MYCOMPUTER_CLSID OpenFileDialog1.ShowDialog Thorsten Doerfler
I like to know to how to set fileopendialog inital directory to "MyComputer". Click to expand... Use the CLSID prefixed by two colons: Const STR_MYCOMPUTER_CLSID As String = _ "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" ' My Computer OpenFileDialog1.InitialDirectory = "::" & STR_MYCOMPUTER_CLSID OpenFileDialog1.ShowDialog Thorsten Doerfler
B barbara_dave May 11, 2005 #4 Hi Thorsten, I tried the code below, it seems setting initial directory to "A\:" instead of "MyComputer". Maybe the const string value is wrong. Thanks Barbara
Hi Thorsten, I tried the code below, it seems setting initial directory to "A\:" instead of "MyComputer". Maybe the const string value is wrong. Thanks Barbara
H Herfried K. Wagner [MVP] May 11, 2005 #5 I tried the code below, it seems setting initial directory to "A\:" instead of "MyComputer". Maybe the const string value is wrong. Click to expand... Thorsten's code works perfectly on my German Windows XP Professional SP2 machine running .NET 1.1 SP1.
I tried the code below, it seems setting initial directory to "A\:" instead of "MyComputer". Maybe the const string value is wrong. Click to expand... Thorsten's code works perfectly on my German Windows XP Professional SP2 machine running .NET 1.1 SP1.