how to use KeyValue in KeyPress event in C# -


in key press event can use keychar property , in keydown event can use keyvalue. need use keyvalue , keychar property in keypress event. how can it?

you can not access keyvalue in keypress event. can use keydown event instead. can use keyvalue , e.keycode.tostring() keychar.

in keydown event : e.keycode.tostring() = keychar

example:

private void yourcontrol_keydown(sender object, e keyeventargs)  {     var keychar = e.keycode.tostring()     var keyvalue = e.keyvalue } 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -