Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change the key pressed value

Status
Not open for further replies.

jpaulino

Programmer
May 28, 2002
26
0
0
DE
Hi all,

I would like to change the key pressed by another value.

e.g. key pressed = "A", return key = "B"

Is it possible ?

Tanks
 
Assuming that the keypress occurs in a text box:

Code:
If e.KeyChar = Chr(Asc("A")) Then
    e.Handled = True
    SendKeys.Send("B")
End If

Beware of the value returned by Asc().
Regards.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top