What's Here?
- Members: 107,398
- Replies: 408,810
- Topics: 62,094
- Snippets: 2,250
- Tutorials: 600
- Total Online: 1,169
- Members: 51
- Guests: 1,118
Who's Online?
|
Welcome to Dream.In.Code |
|
|
Getting VB.NET Help is Easy!
Join 107,398 VB.NET Programmers for FREE! Ask your question and get quick answers from experts. There are 1,169 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!
|
Use OpenFileDialog to browse to a bitmap image and load into a PictureBox.
|
Submitted By: jayman9
|
|
Rating:
 
|
|
Views: 11,955 |
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
|
|
|
Reference Sheets
Bye Bye Ads
Free DIC T-Shirt
Related Sites
Monthly Drawing
Partners
Top Contributors
Top 10 Kudos This Month
|