Private Sub btnBrowsePicture_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowsePicture.Click
Dim a As OpenFileDialog = New OpenFileDialog
a.Filter = ("Image Files|*.*|Bitmap|*.bmp|GIF|*.gif|Icon|*.ico|JPEG|*.jpg|PNG|*.png")
If a.ShowDialog() = Windows.Forms.DialogResult.OK Then
PictureBox1.Image = Image.FromFile(a.FileName)
PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
End If
End Sub
Nguồn: Sharecode.vn