Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stop drawing from being erased on form resize or state changed

Status
Not open for further replies.

MJB3K

Programmer
Jul 16, 2004
524
GB
Hi, I have a little paint app that i have written, you can draw on the screen and load pictures into it.

picturebox is called picCanvas.

However, if I minimize the form or change the form background color, it removes everything that was on there...

How can I get around this problem? I've heard it could be something to do with Paint method...?

Any ideas?

Also just another quick question, how do i go about saving the contents of the picCanvas to a file.

Regards,

Martin

Computing Design And Services:
 
Do you have any relevant code? At a guess, it's possible that when you are making a change (such as minimizing or changing background color) that the function that allows the drawing isn't being called again or that the painting isn't being saved immediately afterward. Just a thought, anyway...

------------------------------------------------------------------------------------------------------------------------
Reason and free inquiry are the only effectual agents against error; they are the natural enemies of error and of error only.

Thomas Jefferson

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top