首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下事件过程。 Private Sub Form_KeyDown(KeyCode As Integer,Shift As Integer) If(Button And 3)=3 Then Print "OK"
有如下事件过程。 Private Sub Form_KeyDown(KeyCode As Integer,Shift As Integer) If(Button And 3)=3 Then Print "OK"
admin
2010-03-30
28
问题
有如下事件过程。 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、按什么都不显示
答案
8
解析
此题考查的是有关鼠标事件的问题。从题目要求来看,上述事件应是鼠标事件过程,下面来看看有关鼠标事件的具体事件。
按下鼠标键事件过程:
Private Sub Form_MouseDown(Button As Integer,_ Shift As Integer,X As Single,Y As Single)
End Sub
松开鼠标键事件过程:
Private Sub Form_MouseUp(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在程序运行过程中并没有得到任何信息,所以无论按什么键都不显示任何内容。注意: 此事件过程并非鼠标事件过程,并且 Button也不是事件过程的参数,即该事件过程中的两个参数在程序运行时没有获得任何信息,所以无论按什么键都不显示任何内容。注意:键盘事件KeyDown、KeyPress和KeyUp。
转载请注明原文地址:https://kaotiyun.com/show/C41p777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
软件工程是一种()分阶段实现的软件程序开发方法。
下列程序段的输出结果是()。publicclassoperatorsandexpressions{publicstaticvoidmain(String[]agrs){inta=3,b=4,c=5;
类变量在类中声明,而不是在类的某个方法中声明,它的作用域是【】。
下列语句中,属于多分支语句的是()。
按Java语言规则,下列赋值语句中不合法的是()。
switch语句中()。
Java中方法的参数传递是【】调用,方法不能改变参数值,但可以改变变量值,两个对象之间的参数字段不能相互交换。
下述内容中()不属于软件工程管理的范畴。
Graphic提供的绘图方法可以分为:绘制【】的方法和绘制文本的方法。
随机试题
在Excel工作表中,先用鼠标单击C4单元格;然后按住Shift键,单击G8单元格;再按住Ctrl键,单击D11单元格,则选定的区域有__________个单元格。
患者男,23岁。因情绪低落,凭空闻声,想自杀2周入院。2周前工作调动不满意,渐出现心情不好,情绪低落,有时凭空听到有人讲自己工作能力不行,没本事,感觉单位同事看自己的眼神中都流露出蔑视,患者为此想自杀。此患者最可能的诊断是
滑环式CT扫描机与传统CT机比较,改变的是
下列利用X线检查的方法是
使尿酸排出增加的因素,下列哪项是错误的
在证券经纪业务中,证券经纪商为客户保密的资料包括()。
甲将自己拥有的一幅名人所作的画卖给乙,约定好乙在签订合同的第二日来取画,结果在签订合同的当晚,该画就被小偷丙盗走,转卖给了不知情的丁。下列说法正确的是()。
下列火于主存储器的描述中,正确的是()I.CPU访存时间由存储器容量决定Ⅱ.ROM和RAM在存储器中是统一编址的Ⅲ.ROM中任意一一个单元可以随机访问Ⅳ.DRAM是破坏性读出,因此需要读后重写
下列叙述中哪一条是正确的( )。
Itisoftenobservedthattheagedspendmuchtimethinkingandtalkingabouttheirpastlives,【71】aboutthefuture.Theseremin
最新回复
(
0
)