I need to draw a line on a form, but it needs to be able to draw on top of other controls on the form.
Drawing a line on a form is no problem, eg.
but this just draws the line on the form's background and any controls on the form get drawn on top of the line, thereby breaking the line.Code:Dim p As New Pen(Color.Red, 3) Form1.CreateGraphics.Clear(Color.Gray) Form1.CreateGraphics.DrawLine(p, 0, 0, 100, 100)
What I need could be accomplished by creating a usercontrol 'Line', but this seems like a lot of overhead for a simple line. There has got to be a better way doesn't there?
Eamon




Reply With Quote