Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I have used draw line (using graphics) to connect two user control. there are many line in a panel. saved all line info in an array. draw all line on activate.. on many events.

but stil when context menu pop up it deletes line behind that.
and when minimize that form all line disappear how to overcome this drawback.

panel.refresh() or panel.activate is also very slow process and without this how to delete unwanted lines..

n there is lots of problem with line

Is thre any another way to draw line which is more object oriented... (means when we place any control on form its always there. we can also identify mouse click mouse move on any control.)can I use picturebox in place of line??? or any other solution??
Posted
Updated 28-Sep-10 2:39am
v2

1 solution

The drawing should be done in OnPaint override if in a derived class, or in Paint event otherwise. This way it will persist.
 
Share this answer
 
v2

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