[填空题] 下面程序是由鼠标事件在窗体上画图,如果按下鼠标将可以画图,双击窗体可以清除所画图形。补充完整下面的程序。
首先在窗体层定义如下变量:
Dim PaintStart As Boolean
编写如下事件过程:
Private Sub FormPLoad()
DrawWidth=2
ForeColor=vbGreen
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer,_
X As Single,Y As Single)
PaintStart=True
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer,_
X As Single,Y As Single)
If PaintStart Then
PSet(X,Y)
End If
End Sub
Private Sub FormMouseUp(Button As Integer, Shift As Integer,_
X As Single,Y As Single)
(9)
End Sub
Private Sub Form_DblClick()
Cls
End Sub