I am trying to draw onto an image in a picturebox. That works fine with
this code:
dim g as graphics = picturebox1.cre ategraphics
r.drawellipse(m ypen, e.X,e.Y, 1, 1)
This will draw where the mouse is located on the picture box. The only
problem is that it does not save the graphics to the image. If I save
the pic, no graphics are there. SO, I tried this:
dim g as graphics = graphics.fromim age(picturebox1 .image)
r.drawellipse(m ypen, e.X,e.Y, 1, 1)
picturebox1.ref resh
g.dispose
This will save the graphics to the image, but the graphics are not
being draw where the mouse is. It is like the e.X and e.Y are not
correct or something. Can anyone tell me how to accomplish what I need?
Thanks
this code:
dim g as graphics = picturebox1.cre ategraphics
r.drawellipse(m ypen, e.X,e.Y, 1, 1)
This will draw where the mouse is located on the picture box. The only
problem is that it does not save the graphics to the image. If I save
the pic, no graphics are there. SO, I tried this:
dim g as graphics = graphics.fromim age(picturebox1 .image)
r.drawellipse(m ypen, e.X,e.Y, 1, 1)
picturebox1.ref resh
g.dispose
This will save the graphics to the image, but the graphics are not
being draw where the mouse is. It is like the e.X and e.Y are not
correct or something. Can anyone tell me how to accomplish what I need?
Thanks