替换字符外的字符 [英] Replace Character Out of Form
本文介绍了替换字符外的字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
下面的VB代码用charA替换任何键盘键
这只在我表格的文本框中完成我的问题是我可以申请
这在Windows的任何地方(其他应用程序的vb形式,如记事本MS字,互联网浏览器字段等),我该怎么办呢谢谢...
代码:
Hi, the following VB code replace any keyboard key with char "A"
this done only in the text box in my form my question is can i apply
this anywhere in windows(other application out of vb form e.g notepad MS word , internet explorer field etc)and how can i do that Thank you ...
code:
Sub textbox_KeyPress(ByVal sender As Object, ByVal e As KeyPressEventArgs) Handles TextBox1.KeyPress
e.KeyChar = ChrW(65)
End Sub
推荐答案
你必须使用Windows钩子并做一些低级编程。这不是你在VB中的任何东西。您可能可以使用C#,但可能需要在C ++中进行。
You have to use windows hooks and do some low level programming. It isn't anything you would in VB. You might be able to use C# but likely would need to do it in C++.
这篇关于替换字符外的字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文