单选题 在窗体上画一个文本框,其名称为Text1,然后编写如下事件过程:
Private Sub Text1_KeyPress(KeyAscii As Integer)
Dim str As String
Str=Chr(KeyAscii)
KeyAscii=Asc(UCase(str))
Text1. Text=String(2, KeyAscii)
End Sub
程序运行后,如果在键盘上输入字母“b”,则在文本框Text1中显示的内容是______。
【正确答案】 C
【答案解析】[解析] Ucase $(string)是将字符串中的小写字母转换为大写字母;Chr $(x)是把x的值转换为相应的ASCII字符。