Private Sub btnbrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnbrowse.Click
Dim ofDlg As New OpenFileDialog()
ofDlg.Title = "เลือกไฟล์รูปภาพ"
ofDlg.Filter = "Bitmap Images(.bmp)|*.bmp|Gif Images(.gif)|*.gif|Jpeg Images(.jpg)|*.jpg| Png Image(*.png)|*.png|All Files (*.*)|*.*"
If ofDlg.ShowDialog = DialogResult.OK Then
tmpFileName = ofDlg.FileName
PictureBox1.Image = Image.FromFile(tmpFileName)
End If
End Sub
Tag : .NET, Ms SQL Server 2008, Win (Windows App), VB.NET, VS 2010 (.NET 4.x)