编写如下程序: Private Sub Form_Click() Print"Welcome!" End Sub Private Sub F…orm_MouseDown(Button As Integer,Shift As Integer,X As Sin

admin2015-05-29  28

问题 编写如下程序:
Private Sub Form_Click()
Print"Welcome!"
End Sub
Private Sub F…orm_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
Pnnt"欢迎!"
End Sub
Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single,Y As Single)
Print"热烈欢迎!"
End Sub
程序运行后,单击窗体,输出结果为

选项 A、欢迎!热烈欢迎!Welcome!
B、欢迎!Welcome!热烈欢迎!
C、Welcome!欢迎!热烈欢迎!
D、Welcome!热烈欢迎!欢迎!

答案A

解析 鼠标事件点击事件和状态事件:其中,点击事件有单击事件(Click)和双击事件(DblClick),这两个事件不区分左键和有键:状态事件又分为按下事件(M0useDown)、移动事件(MouseMove)和弹起事件(Mouseup),这3个事件能够区分出鼠标的左键、右键和中间键。当在控件和窗体上单击鼠标左键的时候,首先触发按下事件,然后触发单击事件,最后触发弹起事件。
转载请注明原文地址:https://jikaoti.com/ti/ha60FFFM
0

随机试题
最新回复(0)