C
croy
After setting the keypress event on a textbox control (my
"special" control), and adding code to react to pressing the
Enter key or the "+" key, I see that the reaction is
happening before the control even gets the focus, or so it
appears.
I'm trying to set up the control to act as a close button if
it has the focus and the Enter key is pressed, or to simply
go to the next control if it has the focus and the "+" key
is pressed.
But when the focus is on the control ahead of this one, and
the Enter key is pressed to move to my "special" control,
the form closes, and I never see my special control get the
focus.
Is there any way to make the keypress event for this control
wait until it has the focus AND the Enter key is pressed?
"special" control), and adding code to react to pressing the
Enter key or the "+" key, I see that the reaction is
happening before the control even gets the focus, or so it
appears.
I'm trying to set up the control to act as a close button if
it has the focus and the Enter key is pressed, or to simply
go to the next control if it has the focus and the "+" key
is pressed.
But when the focus is on the control ahead of this one, and
the Enter key is pressed to move to my "special" control,
the form closes, and I never see my special control get the
focus.
Is there any way to make the keypress event for this control
wait until it has the focus AND the Enter key is pressed?