首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设已经在菜单编辑器中设计了弹出式菜单mnuStyle,要求程序运行时,当用户在文本框Text1上单击鼠标右键时,能够弹出该菜单,则应使用的事件过程是( )。
设已经在菜单编辑器中设计了弹出式菜单mnuStyle,要求程序运行时,当用户在文本框Text1上单击鼠标右键时,能够弹出该菜单,则应使用的事件过程是( )。
admin
2018-06-20
15
问题
设已经在菜单编辑器中设计了弹出式菜单mnuStyle,要求程序运行时,当用户在文本框Text1上单击鼠标右键时,能够弹出该菜单,则应使用的事件过程是( )。
选项
A、Private Sub Text1_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
If Button=2Then
PopupMenu mnuStyle
End If
End Sub
B、Private Sub Text1_MouseDown(Button As Integer,Shift A sInteger,X As Single,Y As Single)
If Button=1Then
PopupMenu mnuStyle
End If
End Sub
C、Private Sub Text1_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
If Button=2Then
mnuStyle.Show
End If
End Sub
D、Private Sub Text1_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
If Button=1Then
mnuStyle.Popup
End If
End Sub
答案
A
解析
为了显示弹出式菜单,通常把PopupMenu方法放在MouseDown事件中,该事件响应所有的鼠标单击操作。按照惯例,一般通过单击鼠标右键显示弹出式菜单,这可以用Button参数来实现。对于鼠标来说,左键的Button参数值为1,右键的Button参数设置为2,因此,可以使用“If Button=2,Then PopupMenu菜单名”语句可以通过单击鼠标右键来响应MouseDown事件、显示弹出式菜单,故本题A选项正确。本题选择A选项。
转载请注明原文地址:https://kaotiyun.com/show/AaGp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
窗体上有1个名称为Commandl的命令按钮,事件过程如下:PrivateSubCommandl_Click()m=-3.6IfSgn(m)Thenn=Int(m)
窗体上有一个名称为Commandl的命令按钮,其单击事件过程如下:PrivateSubCommandl_Click()Fori=3To1Step-1Sum=0
在窗体上画一个名称为List1的列表框,然后编写如下程序:PrivateSubForm_Click0Fori=1To10Item=”Item”&i:Listl.Addltem
窗体上有一个名称为Combo1的组合框,一个名称为Command1的命令按钮。要求编写程序,在组合框中输入一个字符串,当单击命令按钮时,将该字符串逐项与组合框中原有列表项进行比较,若有相同列表项,则将其删除;若没有相同列表项,则将其添加到组合框中。现有人编
在考生目录下已有一个工程文件sjt5.vbp。运行程序后,分别从两个文件中读出数据,放入两个一维数组a、b中。请编写程序,当单击“合并数组”按钮时,将a、b数组中相同下标的数组元素的值求和,并将结果存入数组c。单击“找最大值"按钮时,调用find过程分别找
请根据以下各小题的要求设计VisualBasic应用程序(包括界面和代码)。在名称为Forml的窗体上画一个文本框,其名称为Textl,然后通过属性窗口设置窗体和文本框的属性,实现如下功能:①在文本框中可以显示多行文本;②在文本框中显示垂直
请根据以下各小题的要求设计VisualBasic应用程序(包括界面和代码)。在名称为Forml的窗体上画一个名称为:Labell、标题为”设置速度”的标签,通过属性窗口把标签的大小设置为自动调整。画一个名称为HScrolll的水平滚动条,通过属性窗口设
请根据以下各小题的要求设计VisualBasic应用程序(包括界面和代码)。在Forml的窗体上画一个名称为Textl的文本框,然后建立一个主菜单,标题为”操作”,名称为Op,该菜单有两个子菜单,其标题分别为”显示”和”退出”,其名称分别为。Dis和E
执行语句DimX,YAsInteger后,()。
在数据库管理系统提供的数据语言中,负责数据模式定义的是
随机试题
《法律重述》
某厂生产的仪器,70%可以直接出厂,30%需调试,调试后80%可以出厂.现工厂生产了100台仪器.求:(1)全部能出厂的概率α;(2)至少有2台可以出厂的概率β.(不用计算结果,写出表达式即可)
成人食管的第三个狭窄距中切牙【】
消心痛治疗心绞痛作用原理是倍他乐克治疗心绞痛作用原理是
双端固定桥半固定桥
某电厂烟囱的几何高度为270m,当计算烟囱有效高度时,采用的烟囱的几何高度为( )m。
个体商户李某于2008年3月8日在本市取得工商营业执照,于同年5月10日办理了税务登记。2009年1月15日,李某因有严重的制假贩假行为被工商行政管理部门吊销了工商执照。李某未办理任何手续,将税务登记证卖给他人后销声匿迹。根据上述资料回答下列问题:李
坚持以人为本,全面、协调、可持续的科学发展观,是我们党以邓小平理论和“三个代表”重要思想为指导,从新世纪新阶段党和国家事业发展全局出发提出的重大战略思想。树立和落实科学发展观,要注意把握好的问题是()。
接到不常联系的朋友的电话(没有来电显示),知道对方是谁却叫不出名字,过一会儿就会想起来,这被称为()
金融市场上资金融通一般可分直接融资和间接融资。在下列金融工具中属于间接融资的是()
最新回复
(
0
)