全部题库 / VB / 试题详情
单选题 VB
2013-08-15

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

A.Private Sub Form_MouseDown(Button As Integer,_Shift As Integer,X As Single,
    Y As Single)
      If Button=1 And Blltton=2Then
        PopupMenu a1
      End If
    End Sub
B.Private Stlb Form_MouseDown(Button As Integer,_Shift As Integer,X As Single,
    Y As Single)
      PopupMenu a1
    End Sub
C.Private Sub Form—MouseDown(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 Buttcn=2 Then
        PopupMenu a1
      End If
End Sub

参考答案

B

答案解析

B。【解析】表示窗体的弹出式菜单使用PopupMerm,而单击鼠标的左键或者右键都能弹出菜单,使用的是MoseDown,并且使用Button控制按下的鼠标键Button=1表示的是单击左键,Button=2表示的是单击右键,所以当Button=1或者Button=2时才能实现此功能,所以答案选择B。

你可能感兴趣的试题

A.在多窗体应用程序中,可以有多个当前窗体
B.多窗体应用程序的启动窗体可以在设计时设定
C.多窗体应用程序中每个窗体作为一个磁盘文件保存
D.多窗体应用程序可以编译生成一个EXE文件
A.可以用不同的文件号以不同的读写方式同时打开同一个文件
B.文件中各记录的写入顺序与读出顺序是一致的
C.可以用Input#或Line Input#语句向文件写记录
D.如果用Append方式打开文件,则既可以在文件末尾添加记录,也可以读取原有记录