I am trying to create a program that lets users draw on a picture box, and then save it, when the user clicks Save (button).
However, when I try and save, the dialog box erases the stuff drawn on the Picturebox.
Heres my save code
Any ideas? Thanks
However, when I try and save, the dialog box erases the stuff drawn on the Picturebox.
Heres my save code
VB.NET:
Try
With pic
.Filter = "Images (*.jpg)|*.jpg|" & "Images (*.bmp)|*.bmp|" & "All Files|*.*"
.Title = ".:: Choose file to be saved ::."
.ShowHelp = True
.InitialDirectory = "C:\"
If .ShowDialog() = DialogResult.OK Then 'showDialog method makes the dialog box visible at run time
Dim file As String = pic.FileName
PictureBox1.Image.Save(file)
End If
End With
Catch es As Exception
MessageBox.Show(es.Message, MessageBoxButtons.AbortRetryIgnore)
End Try
Any ideas? Thanks
Last edited: