how to open the file browser dailog osing button click

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jharikrishna
    New Member
    • Aug 2006
    • 15

    how to open the file browser dailog osing button click

    Hi Frnds
    I am working on c#.
    I want the information about to click the button in textbox How to
    Open the file browser dailog.
  • angi the dark angel
    New Member
    • Sep 2006
    • 11

    #2
    this is to open a file dialong wiht imae fies

    With OpenFileDialog1
    .Filter = "(*.BMP;*.JPG;* .JPEG)|*.BMP;*. JPG;*.JPEG|All files (*.*)|*.* "
    If .ShowDialog = DialogResult.OK Then
    If Not (.OpenFile() Is Nothing) Then
    .Title = "Select The Image"
    TextBox1.Text = .FileName
    TextBox2.Text = .FileName
    curfilename = .FileName ' this for the variable
    PictureBox1.Ima ge = Image.FromFile( TextBox1.Text)
    Else
    MessageBox.Show ("No File Selected", "Select a file", MessageBoxButto ns.OK)
    End If
    End If
    End With

    Comment

    Working...