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 I put in the
property? I've tried the obvious - "My Computer", but of course that
doesn't do it.
Thanks 8 12166
The "My Computer" folder isn't a real directory, so you can't access it using
normal directory methods. In Visual Basic 2005, you can access all of the
drives through the My.Computer.FileSystem.Drives collection.
-----
Tim Patrick
Start-to-Finish Visual Basic 2005
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 I put in the
property? I've tried the obvious - "My Computer", but of course that
doesn't do it.
Thanks
Oops, I misread your post. Sorry for the useless information.
You have to use the ID of the folder to access it. This article gives the
details. http://msdn.microsoft.com/msdnmag/is...3/CuttingEdge/
-----
Tim Patrick
Start-to-Finish Visual Basic 2005
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 I put in the
property? I've tried the obvious - "My Computer", but of course that
doesn't do it.
Thanks
Thanks for that. I'm not sure I want or need to go to quite that
length, but I'll try to take it all in.
Tim Patrick wrote:
Oops, I misread your post. Sorry for the useless information.
You have to use the ID of the folder to access it. This article gives the
details.
http://msdn.microsoft.com/msdnmag/is...3/CuttingEdge/
-----
Tim Patrick
Start-to-Finish Visual Basic 2005
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 I put in the
property? I've tried the obvious - "My Computer", but of course that
doesn't do it.
Thanks
You could try My.Computer.FileSystem.SpecialDirectories.Desktop. At least
from there, they can easily choose "My Computer".
Robin
"Steve Marshall" <st****@westnet.net.auwrote in message
news:11**********************@h54g2000cwb.googlegr oups.com...
Thanks for that. I'm not sure I want or need to go to quite that
length, but I'll try to take it all in.
Tim Patrick wrote:
>Oops, I misread your post. Sorry for the useless information.
You have to use the ID of the folder to access it. This article gives the details.
http://msdn.microsoft.com/msdnmag/is...3/CuttingEdge/
----- Tim Patrick Start-to-Finish Visual Basic 2005
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 I put in the
property? I've tried the obvious - "My Computer", but of course that
doesn't do it.
Thanks
Thanks Robin, but at the moment I'm a VS2003 user, and I think
My.Computer... is a VS2005 and/or Framework 2 feature.
RobinS wrote:
You could try My.Computer.FileSystem.SpecialDirectories.Desktop. At least
from there, they can easily choose "My Computer".
Robin
"Steve Marshall" <st****@westnet.net.auwrote in message
news:11**********************@h54g2000cwb.googlegr oups.com...
Thanks for that. I'm not sure I want or need to go to quite that
length, but I'll try to take it all in.
Tim Patrick wrote:
Oops, I misread your post. Sorry for the useless information.
You have to use the ID of the folder to access it. This article gives the
details.
http://msdn.microsoft.com/msdnmag/is...3/CuttingEdge/
-----
Tim Patrick
Start-to-Finish Visual Basic 2005
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 I put in the
property? I've tried the obvious - "My Computer", but of course that
doesn't do it.
Thanks
Steve Marshall wrote:
Thanks Robin, but at the moment I'm a VS2003 user, and I think
My.Computer... is a VS2005 and/or Framework 2 feature.
Then you'll be after GetFolderPath(Environment.SpecialFolder.MyComputer ).
HTH
Andrew
"Andrew Morton" <ak*@in-press.co.uk.invalidschrieb:
>Thanks Robin, but at the moment I'm a VS2003 user, and I think My.Computer... is a VS2005 and/or Framework 2 feature.
Then you'll be after GetFolderPath(Environment.SpecialFolder.MyComputer ).
.... which won't be very useless because the path assigned to 'MyComputer' is
"".
What you can try instead (untested!):
\\\
Const STR_MYCOMPUTER_CLSID As String =
"{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
fbd.InitialDirectory = "::" & STR_MYCOMPUTER_CLSID
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Works beautifully - many thanks Herfried, and all other respondents
too.
Herfried K. Wagner [MVP] wrote:
"Andrew Morton" <ak*@in-press.co.uk.invalidschrieb:
Thanks Robin, but at the moment I'm a VS2003 user, and I think
My.Computer... is a VS2005 and/or Framework 2 feature.
Then you'll be after GetFolderPath(Environment.SpecialFolder.MyComputer ).
... which won't be very useless because the path assigned to 'MyComputer' is
"".
What you can try instead (untested!):
\\\
Const STR_MYCOMPUTER_CLSID As String =
"{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
fbd.InitialDirectory = "::" & STR_MYCOMPUTER_CLSID
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Pavel |
last post by:
Greetings to all -
I'm having a problem processing xml with relative dtd URI specified
using XSLT:
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE mydoc SYSTEM "my.dtd">
<mydoc>
.......
|
by: Grant_S |
last post by:
I need to identify the path to a users "My Document" folder where the
user has a roaming profile and their "My Documents" folder is mapped to
a network share as the H drive (specifically H:\\ -...
|
by: yaipa |
last post by:
All,
I've been asked by my boss to put an Icon in WinXP's "My Computer" for
a utility we use around the shop. My tool of choice is of course
Python and therefore what I am using to attempt my...
|
by: JuLiE Dxer |
last post by:
Is there a way via C# to programmatically retrieve the full path name
to folders like "My Documents" ??
I'm seeing examples with the use of Shell32 stuff I believe,
SHGetSpecialFolderLocation...
|
by: mnlarsen |
last post by:
How do I set the default location to "My Computer" when using the
GetOpenFileName call?
I have tried the following but CSIDL_DRIVES doesn't appear to work. Any
ideas?
WCHAR szFile =...
|
by: Just Me |
last post by:
1)How can I find the folders like "My Recent Document", "Desktop", "My
Pictures",...
if I want to store a file there?
2) How can I find the icon for those files if I want to display it?
...
|
by: Renster |
last post by:
Folks,
Im writing a class library which I need to access a connected device's
(phone) memory via UNC or something alone those lines, but cant work
out out to do it, eg "\\my computer\nokia...
|
by: tman69 |
last post by:
I apologize in advance for the length of this posting and will attempt to simplify as much as possible.
I have an automation application in MS Access which generates reports in Excel and emails...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |