首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
将窗体的KeyPreview属性设为True,然后编写如下程序: Private Sub Form_KeyDown(KeyCode As Integer,Shift As Integer) Print Chr(KeyCode) End Su
将窗体的KeyPreview属性设为True,然后编写如下程序: Private Sub Form_KeyDown(KeyCode As Integer,Shift As Integer) Print Chr(KeyCode) End Su
admin
2019-08-22
23
问题
将窗体的KeyPreview属性设为True,然后编写如下程序:
Private Sub Form_KeyDown(KeyCode As Integer,Shift As Integer)
Print Chr(KeyCode)
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
Print Chr(KeyAscii)
End Sub
运行程序时,按下字母键a,则窗体上显示的是( )。
选项
A、A A
B、A a
C、a A
D、a a
答案
B
解析
KeyCode是按键的实际字符(不区分大小写),KeyAscii是以字符为准,是所按键的ASCⅡ码。
转载请注明原文地址:https://kaotiyun.com/show/GoTp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
假定Picture1和Text1分别为图片框和文本框的名称,则下列错误的语句是()。
注意:下面出现的“考生文件夹”均为%USER%。在考生文件夹下有一个工程文件sjt5.vbp,考生文件夹下in5.dat文件中保存有一篇英文短文。程序运行时,单击“读取并统计”按钮,则按行读取in5.dat文件的内容,并显示到文本框Text1中,
下列有关文件的叙述中,正确的是()。
如图所示,在窗体上有一个文本框控件,名称为TextTime;一个计时器控件,名称为Timer1。要求每1s在文本框中显示一次当前的时间。PrivateSubTimer1TextTime.Text=TimeEndSub在下划线上应填入
某二叉树中度为2的结点有10个,则该二叉树中有()个叶子结点。
(1)在考生文件夹下有一个工程文件sjt3.vbp。其窗体文件上有一个标题为“得分”的框架,在框架中有一个名称为Text1的文本框数组,含6个文本框控件;文本框Text2用来输入难度系数。程序运行时,在左边的6个文本框中输入6个得分,输入难度系数后,单击“
(1)在名称为Form1标题为“选课”的窗体上画一个复选框数组,名称为CH1,共有四个复选框,按顺序其标题分别是“数学”、“语文”、“外语”、“计算机”,其中“语文”、“计算机”复选框处于选中状态,运行时的窗体如图3.147所示。请画控件并设置相应属性。
请根据以下各小题的要求设计VisualBasic应用程序(包括界面和代码)。(1)在名称为Form1的窗体上画1个名称为Framel、标题为“项目”的框架;框架内有1个名称为opt1的控件数组,该控件数组含有三个标题分别为“篮球”“排球”“足球
某图书集团数据库中有关系模式R(书店编号,书籍编号,库存数量,部门编号,部门负责人),其中要求(1)每个书店的每种书籍只在该书店的一个部门销售;(2)每个书店的每个部门只有一个负责人;(3)每个书店的每种书籍只有一个库存数量。则关系模式R最高是()
某二叉树共有12个结点,其中叶子结点只有1个。则该二叉树的深度为(根结点在第1层)
随机试题
咬边产生的原因有电流过大、电弧过长、焊条角度不正确、运条方法不当等。
一个猴群占据某个山头,不让其他猴群进入,这一现象在生态学中称为()
A.近部选穴B.远部选穴C.对证选穴D.对症选穴肾阴不足导致的虚热选肾俞、太溪,体现的选穴规律是
A.急性B淋巴细胞白血病B.急性T淋巴细胞白血病C.急性粒细胞白血病D.急性巨核细胞白血病CD19阳性见于
患者,男,66岁,半身不遂,偏身麻木,舌强言謇,口角歪斜,眩晕头痛,面红目赤,口苦咽干,心烦易怒,尿赤便干,舌质红或红绛,脉弦有力。诊断为中风之中经络,其证型为
判别污水水质的复杂程度属于复杂的依据,下列说法正确的是()。
生产经营单位从事生产经营活动应具备的安全生产条件是:必须遵守《安全生产法》的有关规定和其他有关安全生产的法律、法规,加强安全生产管理,建立、健全生产责任制度,(),确保安全生产。
甲公司2011年至2013年发生的有关交易或事项如下:(1)甲公司于2011年1月2日从其母公司处购入乙公司90%的股权。实际支付价款9000万元。另发生相关交易费用45万元。合并日,乙公司所有者权益的账面价值为11000万元,公允价值为12000万元。
要求:根据所给资料分析企业处理中存在的问题,并计算正确的应纳各种税费,并进行账务调整。(对所有计算过程及结果保留两位小数)资料:济南市区某酒厂,为增值税一般纳税人,具有进出口经营权。主营A牌薯类白酒、B牌啤酒产品境内生产、销售,并向国外出口A牌薯类白酒。薯
荀子指出,“天有常道矣,地有常数矣”“天地合而万物生,阴阳接而变化起”“天行有常,不为尧存,不为桀亡。应之以治则吉,应之以乱则凶”。苟子所表述的观点是
最新回复
(
0
)