Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I used Visual Studio Power Packs in C# and draw line, But this line is not stable and Minimize and Maximize disappear this line.
what work I can do to stable this line on form forever?
Posted
Comments
Herman<T>.Instance 13-Sep-11 5:28am    
show your code!

1 solution

The Line is being drawn by GDI directly on the window, so minimizing and restoring will repaint the form and the line will disappear.

In the form OnPaint event redraw the line on the form.
 
Share this answer
 
Comments
AmirAli1374 13-Sep-11 5:36am    
what is form OnPaint event?
this?
private void Print_OnPaint(object sender, EventArgs e)
Pravin Patil, Mumbai 13-Sep-11 6:13am    
Correct 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