当前位置:百科知识 > 计算机二级

问题描述:

[单选] 在窗体中添加两个文本框,其名称分别为Text1和Text2;两个标签,其名称分别为Label1和Label2。编写程序,使得程序运行后,在文本框Text2中输入小写字母,能转换为比此字母的ASCII码小4的大写字母,结果显示在文本框Text1中。如输入“efg”,则输出的结果为“ABC”,能够实现上述功能的程序是
A.Private Sub Form Load() Show Text1.Text=" " Text2.Text=" " Text2.SetFocusEnd SubPrivate Sub Text2_KeyDown(KeyCode As Integer,Shift As Intege Text1.Text=Chr(KeyCode-4)End Sub B.Private SuForm_Load() Show Text1.Text=" " Text2.Text=" " Text2.SetFocusEnd SubPrivate SuText2_KeyDown(KeyCode As Integer,Shift As Intege Text1.Text=Text1.Text+Chr(KeyCode-4)End Sub C.Private Sub Form_Load() Show Text1.Text=" " Text2.Text=" " Text2.SetFocusEnd SubPrivate Sub Text2_Click(KeyCode As Integer,Shift As Intege Text1.Text=Text1.Text+Chr(KeyCOde-4)End Sub D.Private Sub Form_Load() Show Text1.Text=" " Text2.Text=" " Text2.SetFocusEnSubPrivate Sub Text2_Click(KeyCode As Integer,Shift As Intege Text1.Text=Chr(KeyCode-4)EnSub
参考答案:查看
答案解析:
☆收藏

随机题目