设有如下事件过程: Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If Button=2 Then PopupMenu popM

admin2019-03-14  21

问题 设有如下事件过程:
Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
If Button=2 Then
PopupMenu popMenu
EndIf
End Sub
则以下描述中错误的是(     )。

选项 A、该过程的功能是弹出一个菜单
B、popMenu是在菜单编辑器中定义的弹出式菜单的名称
C、参数X、Y指明鼠标的当前位置
D、Button=2表示按下的是鼠标左键

答案D

解析 考查鼠标事件和弹出菜单。鼠标状态事件有按下(MouseDown)、移动(MouseMove)和弹起(MouseUp),这几种事件能够通过参数区分出鼠标的左键、右键和中间键,鼠标键的对应值及其说明为:1-用户按下左键触发了鼠标事件;2-用户按下右键触发了鼠标事件;4-用户按下中间键触发了鼠标事件。PopupMenu为弹出菜单方法,popMenu为菜单名。题目中程序的功能是当鼠标按下右键时弹出菜单popMenu。
转载请注明原文地址:https://kaotiyun.com/show/FKFp777K
0

相关试题推荐
最新回复(0)