OpenFileDialog Control in VB.Net
A OpenFileDialog control is used to select a file. OpenFileDialog provide files
to the user and retrieves the user's file selection back to the program
Drag and drop OpenFileDialog control from toolbox on the window Form.
Drag and drop PictureBox and a Button.
sender As System.Object,
ByVal e As
System.EventArgs) Handles Button1.Click
' OpenFileDialog will open
' OpenFileDialog will open this directory
'selected Image will show in the pictureBox
PictureBox1.Image = Image.FromFile(OpenFileDialog1.FileName)
' Image.FromFile Method Creates an Image from the
Run the project
When you click select image button then file file browser window will open.
When you select file and click open then selected file will show in the
PictureBox on the Form.