如何使用KeyPress事件更改文本框中的指定字母 [英] how to change specified lettes in textbox with KeyPress event

查看:110
本文介绍了如何使用KeyPress事件更改文本框中的指定字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。我想用文本框的KeyPress事件将一些指定的字母更改为另一个字母。我希望字母Ş改为字母Þ。这对我的工作是必要的,能够在具有拉丁校对的sqlserver上看到正确的字母。我怎样才能做到这一点?使用streamreader,还是其他任何东西?



谢谢你们。

解决方案

我现在解决了, :

 textbox.Text = textbox.Text.Replace( Ş Þ); 


hi all. i want to change some specified letters to another letters with KeyPress event of the textbox. i want the letter "Ş" change to letter "Þ". this is necessary for my work to be able to see the letters correct on a sqlserver which has a Latin collation. how can i do that? with streamreader, or any other thing?

thanks from now.

解决方案

i solved now, with the :

textbox.Text = textbox.Text.Replace("Ş", "Þ");


这篇关于如何使用KeyPress事件更改文本框中的指定字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆