2个回答
展开全部
直接在Form的鼠标移动事件上加Me.Line(X1, Y1)-(X2, Y2),RGB(0,128,192):
Dim xx As Long, yy As Long
Private Sub Form_Load()
Me.AutoRedraw = True
Me.DrawMode = 13
Me.DrawStyle = 6
Me.DrawWidth = 2
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If xx = 0 And yy = 0 Then GoTo neednext
Me.Line (xx, yy)-(X, Y), RGB(0, 128, 192)
neednext:
xx = X
yy = Y
End Sub
Dim xx As Long, yy As Long
Private Sub Form_Load()
Me.AutoRedraw = True
Me.DrawMode = 13
Me.DrawStyle = 6
Me.DrawWidth = 2
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If xx = 0 And yy = 0 Then GoTo neednext
Me.Line (xx, yy)-(X, Y), RGB(0, 128, 192)
neednext:
xx = X
yy = Y
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询