新建一个工程。在窗体上画一个文本框,名称为Text1。设置用户输入的字母一律转换为大写表示,焦点保持在输入文本的最右端。程序运行结果如图5所示。程序中不得使用任何变量。
注意:存盘时必须存放在考生文件夹下,工程文件名为ylcl.vbp,窗体丈件名为ylcl.frm。
第1题:
在名为Form1的窗体上放置一个名为Text1的文本框。程序运行后,用户在文本框中输入的英文字母一律用大写显示(要求焦点在最右端),如下图所示。

注意:
文件必须存放在考生文件夹中,窗体文件名为execise12.frm,工程文件名为 execise12.vbp。

第2题:
在窗体上画一个名称为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"请输入大写字母" KcyCode=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 Or Asc(Text1. Text)<91 Then MsgBox"请输入大写字母" End If End Sub
第3题:
在窗体上画一个名称为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
第4题:
在窗体上画一个名称为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
第5题:
在窗体上画一个名称为Text1的文本框,要求文本框只能接收大写字母的输入。以下能够正确实现该操作的事件过程是______。
A.Private Sub Text1_ KeyPress (KeyAscii As Integer) IfKeyAscii < 65 Or KeyAscii > 9t Then MsgBox “请输入大写字母” End If End sub
B.Private Sub Text1_ KeyDown (KeyCode As Integer, Shift As Integer) IfKeyCode < 65 Or KeyCode > 91 Then MsgBox “请输入大写字母” End If End sub
C.Private Sub Text1_ MouseDown (Button As Integer, _ Shift As Integer, X As Single, YAs SinglE)IfAsc (Text1.Text) < 65 Or Asc (Text1. Text) > 91 Then MsgBox “请输入大写字母” End If End sub
D.Private Sub Text1_ Change() IfAsc(Text 1.Text) < 65 Or Asc(Text1. Text) > 91 Then MsgBox “请输入大写字母” End If End sub