在窗体上画一个名称为Text1的文本框,要求文本框只能接收大写字母的输入。以下能实现该操作的事件过程是( )。
题库:计算机等级考试
类型:最佳选择题
时间:2017-07-03 15:59:06
免费下载:《单项选择》Word试卷
在窗体上画一个名称为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
本题关键词:功能现实成本,钢窗框,本能行为,金属窗框,钢门窗框,木窗框料,塑料门窗框,类本能需要,框架杆件,彩钢门窗副框;