* "Capuchin said:
Is it possible to write code to draw lines on a form? if so...how?
thanks in advance for any help with this
\\\
Private m_ptStartPosition As Point
Private m_ptPosition As Point
Private m_blnMoving As Boolean
Private Sub Form1_MouseDown( _
ByVal sender As Object, _
ByVal e As System.Windows.Forms.MouseEventArgs _
) Handles MyBase.MouseDown
m_blnMoving = True
m_ptStartPosition = New Point(e.X, e.Y)
End Sub
Private Sub Form1_MouseUp( _
ByVal sender As Object, _
ByVal e As System.Windows.Forms.MouseEventArgs _
) Handles MyBase.MouseUp
m_blnMoving = False
End Sub
Private Sub Form1_MouseMove( _
ByVal sender As Object, _
ByVal e As System.Windows.Forms.MouseEventArgs _
) Handles MyBase.MouseMove
m_ptPosition = New Point(e.X, e.Y)
Me.Invalidate()
End Sub
Private Sub Form1_Paint( _
ByVal sender As Object, _
ByVal e As System.Windows.Forms.PaintEventArgs _
) Handles MyBase.Paint
e.Graphics.DrawLine(Pens.Blue, m_ptStartPosition, m_ptPosition)
End Sub
///