i created a drawing apllication in my solution by this code.by this i can draw images in a picturebox and can to save. when i click the clearbutton the image on the picturebox is cleared but the problem is after clearing the image i can't draw any thing in the picturebox without the form's reload
dim mousepath as new system.drawing.drawing2d.graphicspath()
in pageload
picturebox1.image=new bitmap(picturebox1.clientsize.height,picturebox1.clientsize.width)
picturebox1_paint(...)
myusercolor=(sysytem.drawing.color.black)
myalpha=100
using g as graphics=graphics.fromimage(picturebox1.image)
g.clear(color.white)
dim currentpen as pen=new pen(color.fromargb(myalpha,myusercolor),mypenwidth) g.drawpath(currentpen,mousepath)
in mousedown
if e.button=mousebutton.left then
mousepath.startfigure()
end if
in mousemove
if e.button=mousebutton.left then
mousepath.addline(e.x,e.y,e.x,e.y)
end if
picturebox1.invalidate
clearbutton_click
picturebox1.image.dispose()
picturebox1.image=nothing
PROBLEM: if anyone knows the solution for this problem please help me.it's very important for me.thank you