Aldiano Fdem
New member
- Joined
- Jun 10, 2011
- Messages
- 3
- Location
- Bandung, Indonesia, Indonesia
- Programming Experience
- Beginner
my application is used to open a image file from computer with openFileDialog, after the image is opened to picturebox then i plot some dot/square on it then i want to save the edited one to computer
that is my code,the image is not edited, please give me a correction or reference code, how to save the edited image with saveFileDialog?
please help me, urgent..
thank you
VB.NET:
'for opening a image file
Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
'TextBox1.Text = OpenFileDialog1.FileName
If (OpenFileDialog1.FileName.Trim() <> "") Then
PictureBox1.Image = Image.FromFile(OpenFileDialog1.FileName)
End If
End Sub
'for editing
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
Dim z As Point
z = PictureBox1.PointToClient(Cursor.Position)
Dim aGraphics As Graphics
Dim b As Brush = Brushes.Black
aGraphics = PictureBox1.CreateGraphics()
aGraphics.FillEllipse(b, z.X, z.Y, 5, 5)
MsgBox(pushPinStat)
end sub
please help me, urgent..
thank you