Find Current Users Desktop

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JB

    #1

    Find Current Users Desktop

    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


  • Jay B. Harlow [MVP - Outlook]

    #2
    Re: Find Current Users Desktop

    Jason,
    You can use Environment.Get FolderPath to get paths to system folders.

    Something like:
    Dim dialog as New OpenFileDialog
    dialog.InitialD irectory =
    Environment.Get FolderPath(Envi ronment.Special Folder.Desktop)

    Hope this helps
    Jay

    "JB" <jasonb@bellevu e.com> wrote in message
    news:wMF9b.2082 6$8g2.16976@new s1.central.cox. net...[color=blue]
    > 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
    >
    >[/color]


    Comment

    • JB

      #3
      Re: Find Current Users Desktop

      Perfect, Thanks

      "Jay B. Harlow [MVP - Outlook]" <Jay_Harlow@ema il.msn.com> wrote in message
      news:uFt8XaGfDH A.2400@TK2MSFTN GP11.phx.gbl...[color=blue]
      > Jason,
      > You can use Environment.Get FolderPath to get paths to system folders.
      >
      > Something like:
      > Dim dialog as New OpenFileDialog
      > dialog.InitialD irectory =
      > Environment.Get FolderPath(Envi ronment.Special Folder.Desktop)
      >
      > Hope this helps
      > Jay
      >
      > "JB" <jasonb@bellevu e.com> wrote in message
      > news:wMF9b.2082 6$8g2.16976@new s1.central.cox. net...[color=green]
      > > I'm using an OpenFileDialog and I want to set the Initial directory to[/color][/color]
      the[color=blue][color=green]
      > > current users desktop, any quick way to get this?
      > >
      > > Jason
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...