Find Current Users Desktop

  • Thread starter Thread starter JB
  • Start date Start date
J

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
 
Jason,
You can use Environment.GetFolderPath to get paths to system folders.

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

Hope this helps
Jay
 
Perfect, Thanks

Jay B. Harlow said:
Jason,
You can use Environment.GetFolderPath to get paths to system folders.

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

Hope this helps
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top