假定已经在菜单编辑器中建立了窗体的弹出式菜单,其顶级菜单项的名称为a1,其“可见”属性为False。程序运行后,单击鼠标左键或右键都能弹出菜单的事件过程是

admin2011-10-24  29

问题 假定已经在菜单编辑器中建立了窗体的弹出式菜单,其顶级菜单项的名称为a1,其“可见”属性为False。程序运行后,单击鼠标左键或右键都能弹出菜单的事件过程是

选项 A、Private Sub Form_MouseDown(Button As Integer,_
                         Shift As Integer,X As Single,Y As Single)
        If Button=1 And Button=2 Then
              PopupMenu a1
         End If
      End Sub
B、Private Sub Form_MouseDown(Button As Integer,_
                        Shift As Integer,X As Single,Y As Single)
         PopupMenu a1
      End Sub
C、Private Sub Form_MousoDown(Button As Integer,_
                        Shift As Integer,X As Single,Y As Single)
          If Button=1 Then
             PopupMenu a1
          End If
      End Sub
D、Private Sub Form_MouseDown(Button As Integer,_
                            Shift As Integer,X As Single,Y As Single)
           If Buaon=2 Then
              PopupMenu a1
            End If
      End Sub

答案B

解析 单击左键或者右键均可以弹出菜单,因此不需进行判断单击的哪个键。因此本题答案为B)。
转载请注明原文地址:https://kaotiyun.com/show/39hp777K
0

随机试题
最新回复(0)