473,396 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to set directory to "MyComputer"

Hi, all,
I like to know to how to set fileopendialog inital directory to
"MyComputer".

Thanks

Nov 21 '05 #1
3 1339
ba**********@yahoo.com schrieb:
I like to know to how to set fileopendialog inital directory to
"MyComputer".


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
--
http://www.vb-hellfire.de/
Nov 21 '05 #2
As far as I am aware you cannot

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #3
<ba**********@yahoo.com> schrieb:
I tried the code below, it seems setting initial directory to "A\:"
instead of "MyComputer". Maybe the const string value is wrong.


Thorsten's code works perfectly on my German Windows XP Professional SP2
machine running .NET 1.1 SP1.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Pablo | last post by:
Friends! I need to show the dialog "select folder" and get the path selected, using vb.net. The OpenFileDialog control is useless as I want to select a folder and not a file. In vb6 I achieved...
1
by: jeanfor | last post by:
Solution !!! Look for wspwsp.dll in windows\system32\ and add IWAM_"computername" (ie IWAM_MYCOMPUTER if MYCOMPUTER is the name of your computer) account with read and write permissions The...
1
by: Frank Meng | last post by:
Hi. I wrote a program to get the directory of "Recycle Bin" with SHGetSpecialFolderLocation . It works for "Recent", "SendTo", etc. but it doesn't work for "Recycle Bin". At...
1
by: seanick | last post by:
I am trying to locate an installed application, and I so far have been unable to do so programattically. There does not appear to be a way to do so directly from the .NET framework, either 1.1 or...
2
by: larryvan | last post by:
I have been beating my head against a wall for two days now. I need to output a hyperlink using htmltextwriter.write that looks like this: <a...
37
by: jht5945 | last post by:
For example I wrote a function: function Func() { // do something } we can call it like: var obj = new Func(); // call it as a constructor or var result = Func(); // call it as...
8
by: Steve Marshall | last post by:
Hi All, Is it possible to set the InitialDirectory property of an OpenFileDialog so it will open at the "My Computer" level? I want it to open showing all the available drives. If so, what do...
1
by: =?Utf-8?B?UmljaA==?= | last post by:
On my old workstation (development workstation) if I set Application/Enable XP visual styles - I was able to get/see the visual styles - like button borders highlighting when you run the mouse over...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.