By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,905 Members | 1,630 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,905 IT Pros & Developers. It's quick & easy.

how to open the file browser dailog osing button click

P: 15
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.
Sep 8 '06 #1
Share this Question
Share on Google+
1 Reply

P: 11
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.Image = Image.FromFile(TextBox1.Text)
MessageBox.Show("No File Selected", "Select a file", MessageBoxButtons.OK)
End If
End If
End With
Sep 26 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.