Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
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:

VB
Sub textbox_KeyPress(ByVal sender As Object, ByVal e As KeyPressEventArgs) Handles TextBox1.KeyPress
        e.KeyChar = ChrW(65)
End Sub
Posted
Updated 27-Nov-15 18:05pm
v3
Comments
Suvendu Shekhar Giri 28-Nov-15 0:06am    
But why you need that? That sounds very impractical.

1 solution

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++.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900