Click here to Skip to main content
15,907,396 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi,
when I draw a line or something else with minimizing and maximizing the window, there is still nothing in my window!
Please help!
Posted
Updated 13-Nov-10 10:56am
v3

You should only do drawing in the OnPaint handler for your control or window. Otherwise it doesn't stick when the window repaints (resize, bring to front etc.).
 
Share this answer
 
Hi,
use your drawing code withing OnPaint and it would be much more better to draw on Panel object instead of form directly.

try to check this:
http://www.bobpowell.net/picturebox.htm[^]

Regards
Robert
 
Share this answer
 
v2
GDI+ Drawing Basics Sample will be useful to mastering drawing basics in c#
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900