编写如下事件过程: Private Sub Form_MouseMove(Button As Integer,Shift As Interger,X As Single,Y As Single) If(Button And 3)=3 Then Print“

admin2020-07-22  15

问题 编写如下事件过程:
Private Sub Form_MouseMove(Button As Integer,Shift As Interger,X As Single,Y As Single)
If(Button And 3)=3 Then
Print“AAAA”
End If
End Sub
程序运行后,为了在窗体上输出“AAAA”,应按下的鼠标键为(     )。

选项 A、按左键并移动
B、按右键并移动
C、同时按下左、右键并移动
D、按什么键都不显示

答案D

解析 鼠标单击时;鼠标键按下的参数Button可取3个值:按下左键时,Button值为1、按下右键时,Button值为2、按下中间键时,Button值为4。因此始终不能执行语句“Print”.AAAA”,也就不能输出“AAAA”。
转载请注明原文地址:https://jikaoti.com/ti/3DS0FFFM
0

最新回复(0)