What's Here?
- Members: 244,060
- Replies: 692,834
- Topics: 113,100
- Snippets: 3,863
- Tutorials: 935
- Total Online: 1,401
- Members: 93
- Guests: 1,308
|
Use OpenFileDialog to browse to a bitmap image and load into a PictureBox.
|
Submitted By: Jayman
|
|
Rating:
 
|
|
Views: 22,294 |
Language: VB.NET
|
|
Last Modified: October 17, 2006 |
|
Instructions: Drag a PictureBox from the toolbox to your form and set name to PictureBox1. |
Snippet
Dim OpenFileDialog1 As New OpenFileDialog
With OpenFileDialog1
.CheckFileExists = True
.ShowReadOnly = False
.Filter = "All Files|*.*|Bitmap Files (*)|*.bmp;*.gif;*.jpg"
.FilterIndex = 2
If .ShowDialog = DialogResult.OK Then
' Load the specified file into a PictureBox control.
PictureBox1.Image = Image.FromFile(.FileName)
End If
End With
Copy & Paste
|
|
|
Be Social
Reference Sheets
Bye Bye Ads
Monthly Drawing
Top Contributors
Top 10 Kudos This Month
|