Save Image Help

bfsog

Well-known member
Joined
Apr 21, 2005
Messages
50
Location
UK
Programming Experience
5-10
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

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:
Um, thanks for quick reply kulrom

So how do I save the "draft" content?
 
Last edited by a moderator:
Back
Top