
请问是将
TextBox1.AppendText(hanzi(Val(e.KeyChar)))
改成
Char.ToUpper(e.KeyChar)
还是将
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If hanzimode.Checked Then
Dim hanzi = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Select Case e.KeyChar
Case "a" To "z"
TextBox1.AppendText(hanzi(Val(e.KeyChar)))
e.Handled = True
End Select
End If
End Sub
改成
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
Char.ToUpper(e.KeyChar)
End Sub