468,253 Members | 1,308 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,253 developers. It's quick & easy.

Find Current Users Desktop

JB
I'm using an OpenFileDialog and I want to set the Initial directory to the
current users desktop, any quick way to get this?

Jason
Nov 15 '05 #1
2 7133
Jason,
You can use Environment.GetFolderPath to get paths to system folders.

Something like:
Dim dialog as New OpenFileDialog
dialog.InitialDirectory =
Environment.GetFolderPath(Environment.SpecialFolde r.Desktop)

Hope this helps
Jay

"JB" <ja****@bellevue.com> wrote in message
news:wM*******************@news1.central.cox.net.. .
I'm using an OpenFileDialog and I want to set the Initial directory to the
current users desktop, any quick way to get this?

Jason

Nov 15 '05 #2
JB
Perfect, Thanks

"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message
news:uF**************@TK2MSFTNGP11.phx.gbl...
Jason,
You can use Environment.GetFolderPath to get paths to system folders.

Something like:
Dim dialog as New OpenFileDialog
dialog.InitialDirectory =
Environment.GetFolderPath(Environment.SpecialFolde r.Desktop)

Hope this helps
Jay

"JB" <ja****@bellevue.com> wrote in message
news:wM*******************@news1.central.cox.net.. .
I'm using an OpenFileDialog and I want to set the Initial directory to the current users desktop, any quick way to get this?

Jason


Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by reidarT | last post: by
11 posts views Thread by desktop | last post: by
10 posts views Thread by CodeNoob | last post: by
4 posts views Thread by Salad | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.