首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
在窗体上画一个名称为Text1的文本框,要求文本框只能接收大写字母的输入。以下能实现该操作的事件过程是
在窗体上画一个名称为Text1的文本框,要求文本框只能接收大写字母的输入。以下能实现该操作的事件过程是
admin
2006-08-15
46
问题
在窗体上画一个名称为Text1的文本框,要求文本框只能接收大写字母的输入。以下能实现该操作的事件过程是
选项
A、Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii < 65 Or KeyAscii > 90 Then MsgBox "请输入大写字母" KeyAscii = 0 End If End Sub
B、Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode < 65 Or KeyCode > 90 Then MsgBox "请输入大写字母" KeyCode = 0 End If End Sub
C、Private Sub Text1_MouseDown(Button As Integer,_ Shift As Integer, X As Single, Y As Single) If Asc(Text1.Text) < 65 Or Asc(Text1.Text) > 90 Then MsgBox "请输入大写字母" End If End Sub
D、Private Sub Text1_Change() If Asc(Text1.Text) > 64 And Asc(Text1.Text) < 91 Then MsgBox "请输入大写字母" End If End Sub
答案
A
解析
选项 B)中的大写字母与小写字母的KeyCode相同;选项C)中文本框没有触发MouseDown事件;选项D)中判断条件错误,其判断的为输入的是否为大写字母,正好与题目要求相反。
转载请注明原文地址:https://jikaoti.com/ti/HV80FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
给出下面的程序:publicclassex49{staticintarr[]=newint[10];publicstaticvoidmain(Stri
执行下列代码段之后,变量b的值为______。publicclassex40{publicstaticvoidmain(String[]args){
从关系模式中指定若干个属性组成新的关系的运算称为______。
当Applet所在页面被其他页面覆盖时调用的方法是______。
在Java线程模型中,一个线程是由______、______和______三部分组成。
______语句的功能是退出循环,并从紧接着该循环的语句开始继续执行。
关系操作的特点是______操作。
循环语句的循环体部分,不可以是()。
下列叙述中,正确的是
final属性是专门定义_________变量的保留字。
随机试题
与COPD发生关系最密切的是
基因工程中实现目的基因与载体DNA共价拼接的酶是
A、葱B、白萝卜C、鳖肉D、醋E、萸菜人参忌
红天房地产开发公司为开发A楼盘与乙银行签订贷款合同,贷款金额1000万元,并以该开发的楼盘设定抵押担保。红天公司又与蓝天工程公司签订工程合同,由蓝天工程公司承建A楼盘。红天公司为提前收回成本,将该房预售给众客户,并签订了商品房预售合同。众客户有的支付了主要
美国佐治亚州亚特兰大市公民安娜认为,其州议会颁布的关于禁止黑人进入白人学校学习的法律违反宪法的“平等保护”条款。根据美国法律,安娜应该向下列哪一法院起诉?()
土坝坝身控制测量包括()。
国外的老客户向你要求寄送一般丝绸面料样品,量不多但要求快速,你会怎样寄送样品和处理样品寄送的费用()
甲向乙借款,丙与乙约定,丙以其名下的房屋提供贷款担保。丙仅将房产证交付乙,此后以种种理由推脱拒绝前往登记机关办理登记。借款到期后,甲无力清偿,丙的房屋被法院另行查封。下列表述正确的是哪些?()
[*]
PASSAGETHREEWhydoesTNTprovideemergencyhelpandknowledgetransfer?
最新回复
(
0
)