hello all

i want to use shortcut keys ro call different functions in my window application... i have called functions on form_keypress and form_keydown... at the same time i m using a textbox and i want to limit user to enter only numeric data in the textbox but the problem is that if i use the form_key functions the textbox dnt take any input i m stuck in it i have coded a long way by defining another textbox and using that one to take the values entered by user in form_keyPress event but isn't there any easy and direct method to do that????? i hope you are getting my point clearly... please help me on that


Abel Lazm

7 Years
Discussion Span
Last Post by abelLazm

Before exiting the form_key functions, do you set the handled to true, false or do nothing?
Did you analize wich control has the focus to change the behaviour?

Edited by lolafuertes: n/a


Back to work after a long break.... yes i set handled to true before exiting to the form_key function... i am not able to understand what is the problem


Welcome back. Hope you enjoy your break.
So the point is that you are pre-processing the input at form level so when in the textbox no key goes in.
The solution in this case is in the keydown/keypress events, set the handled to false if it is not a shortcut, so will be fordwarded to the next control.

Hope this helps


Thanks lolafuertes.... for welcoming me and answering my query :)... i have checked it and it is solved now thanks for helping :)

Edited by abelLazm: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.