1个回答
展开全部
Dim OldX As Single
Dim OldY As Single
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.PSet (X, Y)
OldX = X
OldY = Y
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Circle (OldX, OldY), Sqr((OldX - X) ^ 2 + (OldY - Y) ^ 2), vbRed
End Sub
Dim OldY As Single
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.PSet (X, Y)
OldX = X
OldY = Y
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Circle (OldX, OldY), Sqr((OldX - X) ^ 2 + (OldY - Y) ^ 2), vbRed
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询