I was trying to save multiple image to a local folder in one go in vb. Right now, i am able to save one image at a time to a specified folder. In my code, i have set up a file name for the image to use when uploaded. What I needed is to save the image with it's original file name and file type. My program should also allow user to save multiple images in one go.
I am Using VB 2013 Ultimate
this is the code for searching.
Try
a.Filter = "Image files | *.*"
If a.ShowDialog() = Windows.Forms.DialogResult.OK Then
PictureBox1.Image = Image.FromFile(a.FileName)
PictureBox1.BackgroundImageLayout = ImageLayout.Stretch
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
If (Not System.IO.Directory.Exists("d:/Site Images/" & Label33.Text & "/")) Then
System.IO.Directory.CreateDirectory("d:/Site Images/" & Label33.Text & "/")
End If
'Dim address = ("d:/Site Images/" & a.FileName & ".jpg")
PictureBox1.Image.Save("d:/Site Images/" & Label33.Text & "/" & "a.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
thanks for the help.