Results 1 to 4 of 4

Thread: Folder Dialog question

  1. #1

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Folder Dialog question

    I am using the following to allow users to pick a file from their computer, however at the moment all it does is allow them to pick a Folder path but not a File and path.

    Any ideas on how to make this work how I want?
    VB Code:
    1. Dim FilePath As String
    2.             Me.FolderBrowserDialog1.SelectedPath = "C:\Windows"
    3.             Me.FolderBrowserDialog1.ShowDialog()
    4.             FilePath = Me.FolderBrowserDialog1.SelectedPath.ToString

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Folder Dialog question

    use the OpenFileDialog instead of the FolderBrowerDialog.

  3. #3

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: Folder Dialog question

    Hmm, I dont actually want them to be able to open a file, I just want them to be able to select a file and return the filepath/filename. This is because I am actually making a mail app, which allows them to pick a file and add it as an attachment.

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Folder Dialog question

    that is what the openfiledialog does...

    its just has "open" in its name because its used for selecting a file that your app will most likely open...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width