Private Sub btnPicBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPicBrowse.Click With Me.OpenFileDialog1 .FileName = "" .Filter = "Image Files(*.BMP;*.JPG;*.JEPG;*.GIF)|*.BMP;*.JPG;*.JEPG;*.GIF|All files (*.*)|*.*" .RestoreDirectory = True .ValidateNames = True .CheckFileExists = True If .ShowDialog = Windows.Forms.DialogResult.OK Then Me.PictureBox1.Image.Dispose() Me.PictureBox1.Image = System.Drawing.Image.FromFile(.FileName) Me.lblPicPath.Text = .FileName End If End With End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)