tags:

views:

292

answers:

1

I'm trying to hijack an asterisk with the form's KeyUp event. I can get the SHIFT key and the D8 key on the KeyUp event, but I can't get the * out of it. I can find it easily in the KeyPress event (e.KeyChar = "*"c), but company standards say that we have to use the KeyUp event for all such occasions. Thanks!

+2  A: 

Cache the charcode on KeyPress and then respond to KeyUp. There are other key combinations that will generate the asterisk, especially if you're facing international users who may have different keyboard layouts, so you can't rely on the KeyUp to give you the information you need.

Andrew M. Greene