Results 1 to 6 of 6

Thread: [2008] Open File Dialog

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2008
    Posts
    493

    [2008] Open File Dialog

    What is The Code for A Open File Dialog... Like A Open Button You Click it then you Select The File You Want!

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: [2008] Open File Dialog

    you've asked this question before and got the correct answer too.

  3. #3
    Hyperactive Member
    Join Date
    Jun 2008
    Location
    Nowhere
    Posts
    427

    Re: [2008] Open File Dialog

    For Folder:
    vb Code:
    1. If Browsedialog.ShowDialog(Me) <> DialogResult.Cancel Then
    2.             TextBox2.Text = Browsedialog.SelectedPath
    3.         End If

    For file:
    vb Code:
    1. Private Function GetFile() As String
    2.         Dim f As New OpenFileDialog
    3.         f.Title = "Choose file"
    4.         f.CheckFileExists = True
    5.         f.DefaultExt = "PSD"
    6.         f.Filter = "PSD files (*.psd)|*.psd|All files (*.*)|*.*"
    7.         f.RestoreDirectory = True
    8.         If f.ShowDialog() = DialogResult.OK Then
    9.             Return f.FileName
    10.         End If
    11.         Return ""
    12.     End Function
    "Programming is like sex. One mistake and you have to support it for the rest of your life." ~Michael Sinz


    Code Snippets/Usefull Links:
    WinRAR DLL|Vista Style Form|Krypton Component Library|Windows Form Aero|Parsing XML files|Calculate File's CRC 32|Download a list of files.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2008
    Posts
    493

    Re: [2008] Open File Dialog

    Quote Originally Posted by .paul.
    you've asked this question before and got the correct answer too.
    You Are Correct but For Some reason when i try to load the file it won't load it all as if i open it up in Notepad so I am seeing if it was the way the Open File Dialog was created!

  5. #5
    New Member
    Join Date
    Jul 2008
    Posts
    12

    Re: [2008] Open File Dialog

    may i know how can i display the full path of the file i chose from the open file dialog into a textbox or label?

  6. #6
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: [2008] Open File Dialog

    vb Code:
    1. textbox1.text = openfiledialog1.filename

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