Dim m_X As Single
Dim m_Drawing As Boolean
Private Sub Form_MouseDown(Button As Integer, Shift As _
Integer, X As Single, Y As Single)
m_Drawing = True
DrawMode = vbInvert
DrawWidth = 4
m_X = X
Line (m_X, ScaleTop)-(m_X, ScaleHeight)
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As _
Integer, X As Single, Y As Single)
If Not m_Drawing Then Exit Sub
Line (m_X, ScaleTop)-(m_X, ScaleHeight)
m_X = X
Line (m_X, ScaleTop)-(m_X, ScaleHeight)
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As _
Integer, X As Single, Y As Single)
m_Drawing = False
Line (m_X, ScaleTop)-(m_X, ScaleHeight)
End Sub
|