[填空题] 下面的程序是由鼠标事件在窗体上画图,如果按下鼠标将可以画图,双击窗体可以清除所画图形。补充完整下面的程序。首先在窗体层定义如下变量: Dim PaIntStart As Boolean

22 查阅

[填空题] 下面的程序是由鼠标事件在窗体上画图,如果按下鼠标将可以画图,双击窗体可以清除所画图形。补充完整下面的程序。首先在窗体层定义如下变量:

Dim PaIntStart As Boolean

编写如下事件过程:

Private Sub Form_Load()

DrawWidth=2

ForeColor=vbGreen

End Sub

Private Sub Form_MouscDown(Button As Integer,Shift As Integer,_

X As Single,Y As Single)

[13]

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 Form_MouseUp(Button As Integer,Shift As Integer,_

X As Single,Y As Single)

[14]

End Sub

Private Sub Form_DblClick()

[15]

End Sub

参考答案:

Cls

计算机考试