线太多了,怎么把多余的线去掉啊
不用cls方法Dim startx, starty As Single
Dim drawing As Boolean
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Form1.AutoRedraw = False
startx = X
starty = Y
drawing = True
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If drawing Then
Form1.Line (startx, starty)-(X, Y)
Form1.MousePointer = 2
End If
End Sub