题目内容:
在窗体上画一个名称为Text1的文本框,要求文本框只能接收大写字母的输入。以下能实现该操作的事件过程是( )。
A.PrivateSubText1_KeyPress(KeyAsciiAsInteger) IfKeyAscii<65OrKeyAscii>90Then
MsgBox"请输入大写字母"
KeyAscii=0
EndIf
EndSub
B.PrivateSubText1_KeyDown(KeyCodeAsInteger,ShiftAsInteger)
IfKeyCode<65OrKeyCode>90Then
MsgBox"请输入大写字母"
KeyCode=0
EndIf
EndSub
C.PrivateSubText1_MouseDown(ButtonAsInteger,_
ShiftAsInteger,XAsSingle,YAsSingle)
IfAsc(Text1.Text)<65OrAsc(Text1.Text)>90Then
MsgBox"请输入大写字母"
EndIf
EndSub
D.PrivateSubText1_Change()
IfAsc(Text1.Text)>64AndAsc(Text1.Text)<91Then
MsgBox"请输入大写字母"
EndIf
EndSub
参考答案:
答案解析: