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
 
Back
Top