Hi,
I am trying to develop an drawing board,like MSpaint,
I use the follwing code to draw an circle while cliking a button
Protected Sub BtnCircle_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnCircle.Click
DrwTool = "Circle"
objGraphics = System.Drawing.Graphics.FromImage(objBitmap)
objGraphics.Clear(Drawing.Color.White)
'Code to Draw Circle
Dim r As New Drawing.Pen(Drawing.Color.Black, 5)
Dim rect As New Drawing.Rectangle(300, 10, 280, 280)
objGraphics.DrawEllipse(r, rect)
Dim b1 As New Drawing.SolidBrush(Drawing.Color.BurlyWood)
'objGraphics.FillEllipse(b1, rect)
objGraphics.DrawArc(Drawing.Pens.DarkBlue, 50, 50, 100, 100, 0, 180)
objGraphics.DrawArc(Drawing.Pens.DarkBlue, 50, 50, 100, 100, 180, 180)
'objGraphics.FillEllipse(Drawing.Brushes.White, 30, 60, 280, 280)
'objBitmap.Save(Server.MapPath("x.jpg"), Drawing.Imaging.ImageFormat.Jpeg)
objBitmap.Save(Response.OutputStream, Drawing.Imaging.ImageFormat.Gif)
objBitmap.Dispose()
objGraphics.Dispose()
End Sub
the code draws the circle,but the problem there with is..all other control went disappear(The whole page only drawn with a single circle)
is anybody there to help me how to override this,
my exact need is draw the objects on mouse event(similarly like MSpaint)
Thanks in advance
Venkatramasamy SN