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 12160
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: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
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: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
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...
| |