更新时间:2023-12-03 09:41:40
代替KeyUp(),请使用KeyPress()事件来捕获您的键盘按键.然后设置e.Handled = true:
Instead of KeyUp(), use KeyPress() event to capture your keyboard presses. Then set e.Handled = true:
private void txtSchoolName_KeyPress(object sender, KeyEventArgs e)
{
string str;
Class2 cls = new Class2();
if (_lang == "te") //te-Telugu language
{
e.Handled = true;
str = cls.TeluguText(txtSchoolName.Text);
txtSchoolName.Text = str;
txtSchoolName.SelectionStart = txtSchoolName.Text.Length;
}