niusouti.com

已知在菜单编辑器中设计了窗体的快捷菜单,其主菜单为a1,且取消其“可见”属性,如图2所示。运行时,以下( )事件过程可以使快捷菜单的菜单项响应鼠标右键单击。

题目

已知在菜单编辑器中设计了窗体的快捷菜单,其主菜单为a1,且取消其“可见”属性,如图2所示。运行时,以下( )事件过程可以使快捷菜单的菜单项响应鼠标右键单击。


相似考题
更多“ 已知在菜单编辑器中设计了窗体的快捷菜单,其主菜单为a1,且取消其“可见”属性,如图2所示。运行时,以下( )事件过程可以使快捷菜单的菜单项响应鼠标右键单击。 ”相关问题
  • 第1题:

    设已经在菜单编辑器中设计了窗体的快捷菜单,某顶级菜单为a1,且取消其“可见”属性。运行时,哪个事件过程可以使快捷菜单的菜单项响应鼠标左键单击和右健单击的事件过程是

    A.Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If Button=2 Then PopupMenu a1,2 End Sub

    B.Private Sub Form_MouseDown(ButtonAsInteger,ShiftAsInteger,X As Single,Y As Single) PopupMenu a1,0 End Sub

    C.Private Sub Form_Mouse Down(Button As Integer,Shift As Integer,X As Single,Y As Single) PopupMenu a1 End Sub

    D.Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If(Button=vbLetfButton) Or (Button=vbRightButton) Then PopupMenu a1 End Sub


    正确答案:C
    解析:MouseDown事件用来响应鼠标单击,其中Button的参数用来确认鼠标按钮(1:左键;2:右键),PopupMenu方法用以在指定坐标位置显示弹出式菜单,语法如下:[对象].PopupMenu菜单名,标志,x,y。其中x,y提供菜单显示位置,标志指定快捷菜单的行为。

  • 第2题:

    设已经在"菜单编辑器"中设计了窗体的快捷菜单,其顶级菜单为Bs,取消其"可见"属性,运行时,在以下事件过程中,可以使快捷菜单响应鼠标右键菜单的是

    A.Private Sub Form_MouseDown(Button As Integer, Shift As Integer,_X As Single,Y As Single) If Button=2 Then PopupMenu Bs, 2 End Sub

    B.Private Sub Form_MouseDown(Button As Integer, Shift As Integer,_X As Single,Y As Single) PopupMenu Bs End Sub

    C.Private Sub Form_MouseDown(Button As Integer, Shift As Integer,_X As Single,Y As Single) PopupMenu Bs,0 End Sub

    D.Private Sub Form_MouseDown(Button As Integer, Shift As Integer,_X As Single,Y As Single) If (Button=vbLeftButton) Or (Button=vbRightButton) Then PopupMenu Bs End Sub


    正确答案:A
    解析:考查弹出式菜单的使用方法。实际上,不管是在窗口顶部菜单条上显示的菜单,还是隐藏的菜单,都可以用PopupMenu方法把它们作为快捷菜单在运行时显示出来。

  • 第3题:

    在菜单编辑器中建立一个菜单,其主菜单项的名称为mnuEdit,Visible属性为False,程序运行后,如果用鼠标右键单击窗体,则弹出与mnuEdit相应的菜单。以下是实现上述功能的程序,请填空。

    Private Sub Form ______(Button As Integer, Shift As Integer, X As Single, Y As Single)

    If Button=2 Then

    ______ mnuEdit

    End If

    End Sub


    正确答案:

     mousedown popupmenu

  • 第4题:

    设已经在菜单编辑器中设计了窗体的快捷菜单,某顶级菜单为a1,且取消其“可见”属性。运行时,以下( )事件过程可以使快捷菜单的菜单项响应鼠标左键单击和右键单击。

    A.Private Sub Form_Mouse Down(Button As Integer,Shift As Integer,_X As Single,Y As Single) If Button=2 Then PopupMenu a1,2 End Sub

    B.Private Sub Form. Mouse Down(Button As Integer,Shift As Integer,_X As Single,Y As Single) PopupMenu a1,0 End Sub

    C.Private Sub Form_Mouse Down(Button As Imeger,Shift As Integer,_X As Single,Y As Single) PopupMenu a1 End Sub

    D.Private Sub Form_Mouse Down(Button As Integer,Shift As Integer,_X As Single,Y As Single) If (Button=vbLetfButton)Or(Button=vbRightButton)Then PopupMenu a1 End Sub


    正确答案:A

  • 第5题:

    设已经在菜单编辑器中设计了窗体的快捷菜单,某顶级菜单为al,且取消其"可见"属性。运行时,可以使快捷菜单的菜单项响应鼠标左键单击和右健单击的事件过程是

    A.Private Sub Form_Mouse Down(Button As Integer, Shift As Integer,_X As Single,Y As Single If Button=2 Then PopupMenu al,2 End Sub

    B.Private Sub Form_Mouse Down(Button As Integer, Shift As Integer,_X As Single, Y As Single PopupMenu al,0 End Sub

    C.Private Sub Form_Mouse Down(Button As Integer, Shift As Integer,_X As Single,Y As Single PopupMenu al End Sub

    D.Private Sub Form_Mouse Down(Button As Integer, Shift As Integer,_X As Single,Y As Single If(Button=vbLetfButton) Or (Button=vbRightButton) Then PopupMenu al End Sub


    正确答案:C
    解析:MouseDown事件用来响应鼠标单击,其中Button的参数用来确认鼠标按钮(1:左键;2:右键),PopupMenu 方法用以在指定坐标位置显示弹出式菜单,语法如下:[对象].PopupMenu 菜单名,标志,x,y。其中中x,y提供菜单显示位置;标志:指定快捷菜单的行为。