On which control you want to paint?
Following code will draw a line on a form, by hooking up to the paint event:
Private Sub Form1_Paint(ByVal sender As Object, _
ByVal e As System.Windows.Forms.PaintEventArgs) _
Handles MyBase.Paint
Dim g As Graphics = e.Graphics()
Dim pen As New Pen(Color.Black)
pen.Width = 3
g.DrawLine(pen, 1, 10, Me.Width, 10)
End Sub
--
Greetz,
Jan
__________________________________
Read my weblog:
http://weblogs.asp.net/jan
"Bulba008" <bu******@op.pl> schreef in bericht
news:bq**********@news.onet.pl...
How to put pixel or draw line in VB.NET?
Please short example.
B.