新建From1(窗体),新建Text1(TextBox),代码:
Private Sub Text1_KeyPress(keyascii As Integer) Me.Caption = keyascii End Sub