Draw a Line in a Panel Control?

  • Thread starter Thread starter Roger Odermatt
  • Start date Start date
R

Roger Odermatt

Hello

Can anybody help me, how can draw a line in a Panel Control?

I try it with this code:
---------------------------------
Dim myPen As New Pen(Color.White, 1)
Me.panDetail.CreateGraphics.DrawLine(myPen, iLeft, iTop,
Me.panDetail.Width - 24, iTop)
---------------------------------

But i can't see on my Panel!

What is wrong?

Thank you very much
regards Roger
 
Try creating a Paint event handler for the Panel (panDetail) and drawing the
line from there.
 
Back
Top