帮我修改一下画直线的代码,多谢
帮我修改一下画直线的代码,多谢Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
xx = X
yy = Y
End If
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Picture1.Line (xx, yy)-(X, Y)
End If
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Picture1.Line (xx, yy)-(X, Y)
End If
End Sub
画的直线起点总是在picture的左上角,不知为什么?