在窗体上画两个文本框,其名称分别为Text1和Text2,然后编写如下事件过程:
题型:填空题
问题:
在窗体上画两个文本框,其名称分别为Text1和Text2,然后编写如下事件过程:
Private Sub Form_Load()
Show
Text1.Text=" "
Text2.Text=" "
Text2.SetFocus
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer,Shift As Integer)
Text1.Text=Text1.Text+Chr(KeyCode-4)
End Sub
程序运行后,如果在Text2文本框中输入“eFghi”,则Text1文本框中的内容为 【11】 。