vb编一个用鼠标操控的画直线的程序
发布网友
发布时间:2022-10-18 11:03
我来回答
共1个回答
热心网友
时间:2023-11-12 17:48
简易的:
Dim dx, dy
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
dx = X
dy = Y
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Line (dx, dy)-(X, Y), vbRed
End Sub