首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下事件过程: Private Sub Form_KeyDown(KeyCode As Integer,Shift As Integer) If(Button And 3)=3 Then Print"OK" End
有如下事件过程: Private Sub Form_KeyDown(KeyCode As Integer,Shift As Integer) If(Button And 3)=3 Then Print"OK" End
admin
2013-01-23
27
问题
有如下事件过程: Private Sub Form_KeyDown(KeyCode As Integer,Shift As Integer) If(Button And 3)=3 Then Print"OK" End If End Sub 程序运行后,为了在窗体上输出"OK",应当按下的鼠标键是
选项
A、左键
B、右键
C、同时按下左键和右键
D、按什么都不显示
答案
D
解析
此题考查的是有关鼠标事件的问题。从题目要求来看,上述事件应是鼠标事件过程,下面来看看有关鼠标事件的具体事件。
按下鼠标键事件过程:
Private Sub Form_MouseDown(Button As Integer,_Shift As Integer,X As Single,Y As Single)
End Sub
松开鼠标键事件过程:
Private Sub Form_Mouse Up(Button As Integer,Shift_As Integer,X As Single,Y As Single)
End Sub
移动鼠标光标事件过程:
Private Sub Form_MouseMove(Button As Integer,_Shift As Integer,X As Single,Y As Single)
End Sub
以上3个鼠标事件过程具有相同的参数,含义如下:
Button表示被按下的鼠标键;
Shift表示Shift、Ctrl、Alt键状态;
X,Y表示鼠标光标的当前位置。
现在再来看一下事件过程,可知此事件过程并非鼠标事件过程,并且Button也不是事件过程的参数,即此事件过程的两个参数KeyCode和Shift在程序运行过程中并没有得到任何信息,所以无论按什么键都不显示任何内容。
转载请注明原文地址:https://kaotiyun.com/show/bghp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
在窗体上画两个名称分别为Command1和Command2、标题分别为“初始化”和“求和”的命令按钮。程序运行后,如果单击“初始化”命令按钮,则对数组a的各元素赋值:如果单击“求和”命令按钮,则求出数组a的各元素之和,并在文本框中显示出来,如图所示。请填
有下列程序:PrivateSubCommand1_Click()DimiAsIntegerDimarrY(5)AsIntegerFori=
设组合框Combo1中有3个项目,则以下能删除最后一项的语句是______。
能够确定控件或窗体大小的属性是______。
程序段如下,当发生Form_Click事件时,窗体上输出的结果是()。OptionExplicitPrivatexAsIntegerPublicyAsIntegerSubTest()D
窗体的()方法可把窗体隐藏起来,但不从内存中卸载。
定义过程的格式中,Static关键字的作用是指定过程中的局部变量在内存中的存储方式。若使用了Staff关键字,则
下面叙述正确的是______。
关系的数据操纵语言按照表达式查询方式可分为两大类,关系代数和【】。
设有如下关系表______。则下列操作中,正确的是______。
随机试题
AHLABH-2CAgBH-1DchLAEGPLA小鼠的主要组织相容性抗原是
A、咯血伴脓痰B、咯血伴皮肤黏膜出血C、咯血伴心尖部舒张期杂音D、咯血伴刺激性干咳E、咯血伴黄疸支气管扩张
临终患者最早出现的心理反应阶段是
保险公估人可以同时代表( )的发货人、收货人、运输公司和保险公司开展监装监卸工作。
按照现行外商投资企业和外国企业所得税法的规定,国内支付单位与外国企业签订借款、技术转让、财产租赁等合同或协议,也应按照规定扣缴预提所得税的有( )。
出售型房地产开发项目的计算期是自项目建设开始起至()止的时间。
上市公司发行分离交易的可转换公司债券,除符合公开增发股票的一般条件外,还应当符合的条件不包括()。
《关于改善农村人居环境的指导意见》指出,到2020年,全国农村居民住房、饮水和出行等基本生活条件明显改善,人居环境基本实现干净、整洁、便捷,建成一批()的美丽宜居村庄。
在教师的主导下,师生在教育教学情境中互动,不仅使学生掌握学科知识。还逐渐确立良好的师生关系,实现教学相长的目标。良好师生关系建立的基础是师生之间的()。
A、Anairwoman.B、Ateacher.C、Alawyer.D、Asecretary.D细节辨认题。解答本题的关键是抓住问题中的firstjob。短文开头部分介绍了AmyJohnson的生平经历,从出生到后来成为一名先锋飞行员
最新回复
(
0
)