Re: OpenFileDialog: MyComputer
- From: Otis Mukinfus <phony@xxxxxxxxxxxxxxxx>
- Date: Sat, 09 Sep 2006 08:20:04 -0500
On Fri, 8 Sep 2006 11:21:56 -0400, "Stoitcho Goutsev \(100\)" <100@xxxxxxx>
wrote:
Mike,
MyComputer is not a phisical folder on the disk that's why
Environment.GetFolderPath returns an empty string. This btw is documented
behavior. Folders such MyComputer are called virtual folders and they have
pre-defined GUIDs that OpenFileDialog can open them.
Try this:
openFileDialog.InitialDirectory =
"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}";
Other special folder GUIDs are:
MyComputer - ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}
MyDocuments - ::{450D8FBA-AD25-11D0-98A8-0800361B1103}
MyNetworkPlaces - ::{208D2C60-3AEA-1069-A2D7-08002B30309D}
Printers - ::{2227A280-3AEA-1069-A2DE-08002B30309D}
RecycleBin = ::{645FF040-5081-101B-9F08-00AA002F954E}
Stoitcho,
This is a bit off topic, but perhaps you know the answer to this one also:
In XP it annoys me that the MyDocuments folder is at the top of the folder list
when I open the File Browser. Is there a way to make it appear at the bottom of
the list?
Thanks,
Good luck with your project,
Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
.
- References:
- OpenFileDialog: MyComputer
- From: Mike Wesling
- OpenFileDialog: MyComputer
- Prev by Date: Re: SaveFileDialog + FileName
- Next by Date: Re: xml serializing of IList
- Previous by thread: Re: OpenFileDialog: MyComputer
- Next by thread: Debug output...
- Index(es):
Relevant Pages
|