C# Paint/OnPaint methods

Soldato
Joined
9 Jul 2006
Posts
3,322
Location
London
Hopefully someone can help me out here, as I cant find anything anywhere.

Basically I've got a few panels, and I want to draw some lines on top of them. I've tried implementing my own PaintEventHandler, overriding the OnPaint method etc, but the panels keep getting drawn on top of the lines :mad:

Is there a way to change the order that the form draws the components/your own shapes?
 
argh nevermind, sods law I've found a way to do it just as I posted this thread.

I was getting the Graphics object from the form, whereas to draw on the panel I needed to get it from the panel, duh :p
 
Back
Top Bottom