' this for create folder at c:\MyPicture\
If (Not System.IO.Directory.Exists("C:\MyPicture")) Then
System.IO.Directory.CreateDirectory("C:\MyPicture")
End If
'this for open file in picture box
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
' this for copying file
If System.IO.File.Exists(SourcePath) = True Then
File.Copy(SourcePath, DestinationPath, True)
End If Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444