A strange issue is occuring in my application.
I have a user entry process with a series of steps, guided by msgs and a single splash form. The app checks that the user follows the required steps and stores data at the end of the process, during which keypresses (rtn or esc) are required at certain points. After completing the process once, the user may choose to repeat the steps followed.
On the first attempt all keypresses are detected and handled in the form keydown event. However, on the second pass, detection of the Return keypress ceases. All other key presses are caught and processed correctly, but Return does not even raise the keydown event.
Any ideas or suggestions gratefully recieved!
Rgds,
Stuart Kirk
Loading
akhilPosted Mar 25, 2009, 8:31 AM
then click event will fire and not keypress of button
josephPosted Jan 5, 2009, 2:39 PM
A not perfect but good solution might be to use
PreviewKeyDown
This will get the enter key press but isn't quite ASCII for digits.
AlanPosted Aug 28, 2008, 11:44 AM
Not really unless you're calling methods such as IsInputKey which could change the status of the return key.
One thing you could try is to explicitly set the AcceptButton property to Nothing before each run, just in case it's being changed indirectly by some other code.
Stuart KirkPosted Aug 28, 2008, 6:50 AM
Keypreview = true
There is no modification of the acceptbutton in my code...
Any ideas?
AlanPosted Aug 26, 2008, 12:22 PM
It sounds like the return key is going straight to a control on the form after the first pass.
I take it that you've got the Form's KeyPreview property set to True to capture any key presses at form level to start with.
Is it possible that you're changing the AcceptButton property at some later point?
Stuart KirkPosted Aug 26, 2008, 12:20 PM