vb中line画直线无显示,求解
Dim prex As Double, prey As DoublePrivate Sub Form_Load()
DrawState = False
End Sub
Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DrawState = True
prex = X
prey = Y
End If
If Button = 2 Then
Circle (X, Y), 300
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If DrawState = True Then
Line (prex, prey)-(X, Y)
prex = X
prey = Y
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DrawState = False
End If
End Sub