首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设已经在菜单编辑器中设计了弹出式菜单 mnuStyle,要求程序运行时,当用户在文本框 Text1上单击鼠标右键时,能够弹出该菜单,则 应使用的事件过程是( )。
设已经在菜单编辑器中设计了弹出式菜单 mnuStyle,要求程序运行时,当用户在文本框 Text1上单击鼠标右键时,能够弹出该菜单,则 应使用的事件过程是( )。
admin
2019-03-14
31
问题
设已经在菜单编辑器中设计了弹出式菜单
mnuStyle,要求程序运行时,当用户在文本框
Text1上单击鼠标右键时,能够弹出该菜单,则
应使用的事件过程是( )。
选项
A、Private Sub Text1_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
If Button=2 Then
PopupMenu mnuStyle
End If
End Sub
B、Private Sub Text1_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
If Button=1 Then
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=2 Then
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=1 Then
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/W7Fp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
下列控件中,不响应Click事件的是
以下关于事件、事件驱动的叙述中,错误的是
VisualBasic中的“启动对象”是指启动VisualBasic应用程序时,被自动加载并首先执行的对象。下列关于VisualBasic“启动对象"的描述中,错误的是
有数据定义语句:Dima,bAsIntegerDimx%,yasInteger执行语句后,不是整型变量的是
下面程序运行时,若输入395,则输出结果是PrivateSubCommandlClick0Dimx%x=InputBox(“请输入一个3位整数”)PrintxMod10,x\100,(xMod100)\10EndSub
下面是求最大公约数的函数的首部Functiongcd(ByValxAsInteger,ByValyAsInteger)AsInteger若要输出8、12、16这3个数的最大公约数,下面正确的语句是
窗体上有一个列表框控件Listl。以下叙述中错误的是
请根据以下各小题的要求设计VisualBasic应用程序(包括界面和代码)。(1)在名称为Forml的窗体上画出包含三个命令按钮的控件数组,名称为cmdl,下标分别为0、1、2,Caption分别为“开始”、“停止”和“退出”,如图3(A)所示。通过属
下面的数写成普通十进制数是()。2.65358979335278D-6
如果一个顶级菜单项的访问键为D,则以下等同于单击该菜单项的操作为
随机试题
关于骨折的临床表现,下列哪项描述是错误的
下列案件可以适用简易程序审理的是:
一、背景某机电安装公司承建了一植物油厂的锅炉机电安装工程,为保证质量、加快进度、降低成本,该公司项目部组织有关技术人员进行施工方案设计,为了选择确定能保证焊接质量的焊接方法,已初选出电渣焊、埋弧焊、CO2气体保护焊、混合焊四个焊接方案。根据调查资
公司收购是高风险业务,在收购过程中,收购公司主要面临的风险有()
在十多年前,因被报道在全球分店使用含有牛肉调味剂的油脂制作法式炸薯条,麦当劳曾几乎被迫撤离印度市场。众所周知,麦当劳是以汉堡作为其主打产品的。然而汉堡的主要原料牛肉却成为麦当劳在印度惹争议的一个根源。在印度,信奉印度教的人占到印度总人口的80%,他们将牛奉
阅读以下文字。回答下列问题。“今天,你节省了多少碳?”有一群“环保达人”,自觉地少开私家车、坚持走楼梯,电脑不用就关机。用清单列出自己一天的碳排放总量,并把“减碳日记”实时挂到网上……这就是眼下正时兴的“低碳生活”。进入2011年,低碳与生活的联系更加紧
A、 B、 C、 D、 B
设f(x)在[0,1]连续可导,且f(0)=0.证明:存在ξ∈[0,1],使得f’(ξ)=2∫01f(x)dx.
常用的数据传输速率单位有Kbps、Mbps、Gbps与Tbps。1Mbps等于
Althoughmanyofusmayfeelair-conditionersbringrelieffromhot,humidorpollutedoutsideair,theyposemanypotentialhea
最新回复
(
0
)