首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
已知在菜单编辑器中设计了窗体的快捷菜单,其主菜单为a1,且取消其“可见”属性,如图 2所示。运行时,以下( )事件过程可以使快捷菜单的菜单项响应鼠标右键单击。
已知在菜单编辑器中设计了窗体的快捷菜单,其主菜单为a1,且取消其“可见”属性,如图 2所示。运行时,以下( )事件过程可以使快捷菜单的菜单项响应鼠标右键单击。
admin
2013-10-17
21
问题
已知在菜单编辑器中设计了窗体的快捷菜单,其主菜单为a1,且取消其“可见”属性,如图 2所示。运行时,以下( )事件过程可以使快捷菜单的菜单项响应鼠标右键单击。
选项
A、Private Sub Form MouseDown(Button As Integer,_
ShiftAs Integer,XAs Single,YAs Single)
IfButton=2 Then PopupMenu al,2
End Sub
B、Private Sub Form_MouseDown(ButtonAs Integer,_
ShiftAs Integer,XAs Single,YAs Single)
PopupMenu a1,0
End Sub
C、Private Sub Form_MouseDown(ButtonAs Integer,_
ShiftAs Integer,XAs Single,YAs Single)
PopupMenual
End Sub
D、Private Sub Form_MouseDown(ButtonAs Integer,ShiftAs_
Integer,X As Single,Y As Single)
If(Button=vbLetfButton)Or(Button=vbRightButton)Then PopupMenu al
End Sub
答案
A
解析
本题考查弹出菜单的显示。PolmpMenu为弹出菜单方法,使用格式为:[对象.]PopupMenu菜单名,标志,x,y;其中,标志表示弹出的位置和触发的键,取值为0表示弹出菜单的左端在x处且识别左键单击,取值为04表示位于x的中心,取值为08表示在x的右边,一般判断是否单击右键,可通过判断Button是否为2来实现。
转载请注明原文地址:https://kaotiyun.com/show/qUQp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
在考生文件夹中有工程文件execise92.vbp及窗体文件execise92.frmo在名为Form1的窗体中有一个RichText文本框控件(名称为rtx1),一个文本框控件(名称为Text1),两个命令按钮(名称分别为Cmd1和Cmd2,标题分别为
在Form1的窗体上绘制一个文本框,名为Text1绘制一个命令按钮,名为Cmd1,标题为“显示”,它的Tablndex属性设为0。请为Cmd1设置适当的属性,使得当焦点在Cmd1上时,按Esc键就调用Cmd1的Click事件,该事件过程的作用是在文本框中显
在名为Form1的窗体上绘制一个文本框,名为Text1,字体为“宋体”,文本框中的初始内容为VisualBasic:再绘制一个命令按钮,名为Cmd1,标题为“改变字体为黑体”。请编写适当事件过程,使得在运行时,单击命令按钮,则把文本框中文字的字体改为黑体
在窗体上建立二级菜单,第一级含2个菜单项,标题分别为“文件”和“帮助”,名称分别为vbFile、vbHelp,其中“帮助”菜单含有一个子菜单,共有3个菜单项,它们的标题依次为“VisualBasic帮助”、“关于VisualBasic”、“与我们联系”
在名为Form1的窗体上绘制一个名称为Pic1的图片框,并利用属性窗口把考生文件夹中的图标文件Open.ico放到图片框中;再绘制一个通用对话框控件,名为CD1,利用属性窗口设置相应属性,即打开对话框时:标题为“打开文件”,文件类型为“Word文档”,初始
在窗体上绘制一个名为Pic1的图片框和一个名为Cmd1、标题为“显示”的命令按钮。编写适当的事件过程,使程序运行后,若单击“显示”命令按钮,则在图片框中显示“图片框1”,运行结果如下图所示。注意:不要使用任何变量,直接显示字符串;文件必须
在名为Form1的窗体上建立一个名为Cmd1的命令按钮数组,含3个命令按钮,它们的Index属性分别为0、1、2,标题依次为Yes、No和Cancle,每个按钮的高、宽均为400、700。窗体的标题为“Cmd窗口”。运行后的窗体如下图所示。注意
已知在4行3列的全局数组score(4,3)中存放了4个学生3门课程的考试成绩(均为整数),现需要计算每个学生的总分,某人编写程序如下:OptionBase1PrivateSubCommand1_Click()Dim
产生[10,27]之间的随机整数的VisualBasic表达式是
随机试题
下列关于Windows7菜单的说法中,不正确的是______________。
A、热因热用B、寒因寒用C、塞因塞用D、通因通用E、热者寒之用补益药治疗闭塞不通症状的病证,属于
“医乃仁术”是指
下列关于药品检验机构的设置的说法,错误的是
手提式和局部照明灯具应选用安全电压或双重绝缘结构。在使用螺口灯头时,灯头螺纹端应接至电源的工作中性线。()
1.背景东北某市新建一建筑面积39600m2的文化体育中心工程,地上6层,地下2层,局部埋深9m。工程选址位于某山坡.一半基础须回填,混凝土灌注桩局部桩承台加整体筏板基础,地上钢筋混凝土框架结构。3层会议厅主梁采用预制钢筋混凝土,1000人餐厅采用预应力
一般资料:刘某,男性,14岁,初中二年级学生。案例介绍:刘某性格内向,遵守纪律,学习认真,热情助人,人际关系良好,很受同学的喜欢。刘某喜欢看科幻片和动画片,对埃及风土人情感兴趣,一年多前曾在母亲陪同下第一次出国去埃及旅游。当时对母亲说自己很多地方
公安机关中上下级关系是如何规定的?
微分方程y’’一7y’=(x一1)2的待定系数法确定的特解形式(系数的值不必求出)是_________.
U.S.healthofficialsareincreasingsurveillancemeasuresatdoctors’officesandinternationalborderstoguardagainstthes
最新回复
(
0
)