首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设已经在菜单编辑器中设计了弹出式菜单mnuStyle,要求程序运行时,当用户在文本框Text1上单击鼠标右键时,能够弹出该菜单,则应使用的事件过程是( )。
设已经在菜单编辑器中设计了弹出式菜单mnuStyle,要求程序运行时,当用户在文本框Text1上单击鼠标右键时,能够弹出该菜单,则应使用的事件过程是( )。
admin
2019-08-21
27
问题
设已经在菜单编辑器中设计了弹出式菜单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、Prixrate 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://jikaoti.com/ti/LMN0FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
设有下面的程序段:x=InputBox("请输入一个整数")ReDima(x)Fork=XTo0Step-1a(k)=kNextk一般,在这段程序之前应先进行数组a的定义。下面定义语句中正确的是
假定在图片框Picturel中装入了一个图片,在程序运行中,为了清除该图片(注意,清除图片,而不是删除图片框),应采用的正确方法是
以下事件过程的功能是:从已存在于磁盘上的顺序文件Num1.txt中读取数据,计算读出数据的平方值,将该数据及其平方值存入新的顺序文件Num2.txt中。则在以下横线处合适的语句是()。PrivateSubForm_Click()Dimx
下列叙述中正确的是()。
在数据库管理技术发展的三个阶段中,没有专门的软件对数据进行管理的是()。
已知变量x、y为整数型,且x=4,y=12,s为字符串型,且s=a,LblOk为标签控件,下列赋值语句不合法的是()。
不能正确表示条件“两个整型变量A和B之一为0,但不能同时为0”的布尔表达式是()。
请根据以下各小题的要求设计VisualBasic应用程序(包括界面和代码)。(1)在名称为Form1的窗体上画两个标签(名称分别为lblName和lblAge,标题分别为“姓名”和“年龄”)、两个文本框(名称分别为txtName和txtAge,
为了验证一个正整数n(n>3)是否为素数,最直观的方法是,看在2~n/2范围内能否找到一个整数m将n整除,若m存在,则n不是素数;若找不到m,则n为素数。在考生文件夹下有一个工程文件sjt5.vbp,其窗体上有1个名称为Text1的文本框。请根据上面的算法
窗体上有一个名称为VScrolll的垂直滚动条,为了设定单击滚动条两端箭头时的Value增量值,应设置的属性是()。
随机试题
社会经济制度变革的最基本、最深刻的动力是()
酶竞争性抑制作用的特点是(1998,2012)
预拼装时,高强度螺栓和普通螺栓连接的多层板叠,应采用试孔器进行检查。当采用比螺栓公称直径大0.3mm的试孔器检查时,每组孔的通过率应为85%。()
下列选项中,()是整个法律体系的基础。
在进口设备抵岸价计算中,关税计算是以()为计费基数。
下列建筑场所中,需要设置室内消火栓系统的是()。
自助式福利计划的实施方式所包括的内容有( )。
春秋战国时期学术思想比较自由,史称百家争鸣。以下对应正确的有()。
高某吃饭时因饭菜不合口与服务员刘某发生争执,棒打对方致轻微伤,民警赶到现场时,肇事者已逃离现场,在市场检查时发现高某。经民警进一步调查询问,违法嫌疑人刘某交代2016年7月12日曾溜进邻家进行盗窃、窃取现金300多元。对刘某的行为,定性恰当的是(
A.EducationB.PeopleC.TransportD.DrinksE.FoodF.Nightlife*
最新回复
(
0
)