problem with graphic's draw line

S

sympatico

hello,

im drawing a line on a form with has a couple of labels now the first
problem that im having is that the line when drawn goes behind the labels
whereas i want it to be over them

second when i scroll the page the line repeats itself showing multiple lines
i dont want that to happen

the code that im using is

Public Sub DrawGWT(ByVal yVal As Integer)

Dim g As Graphics = Me.CreateGraphics()



Dim myPen As New Pen(Color.Blue, 2)

g.DrawLine(myPen, 12, 344 + yVal, 100, 344 + yVal)

End Sub



please help me
 
C

Cor Ligthert

Sympatico,

You are sure you want to draw a line and not use a control with twho lines
which you made very short together.

Know that drawing of lines makes your program slow. So when it is important
you should do it, however when you avoid that, do the last. And when I read
your solution I think you can avoid it.

Just my thought,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top