M
Mike
Hi,
I have such problem:
On my form I have TabControl. I want to move from one tab to another
using "Next" and "Prev" button. This part works fine.
But control also supports switching between TabPagess using
combination of buttons Ctrl+Tab (forward) and Ctrl+Shift+Tab (back). I
would like to suppress such possibility.
The first think that I tried - set "TabStop" to False.
Also at the article "Control.KeyDown Event " I found such text:
"To handle keyboard events only at the form level and not allow other
controls to receive keyboard events, set the KeyPressEventArgs.Handled
property in your form's KeyPress event-handling method to true.
Certain keys, such as the TAB, RETURN, ESCAPE, and arrow keys are
handled by controls automatically. In order to have these keys raise
the KeyDown event, you must override the IsInputKey method in each
control on your form. The code for the override of the IsInputKey
would need to determine if one of the special keys is pressed and
return a value of true. "
The problem is that I can not find place where (how) I have to
overriding the IsInputKey method. Or is it wrong way?
Maybe somebody has an another idea how fix such problem.
Thanks
I have such problem:
On my form I have TabControl. I want to move from one tab to another
using "Next" and "Prev" button. This part works fine.
But control also supports switching between TabPagess using
combination of buttons Ctrl+Tab (forward) and Ctrl+Shift+Tab (back). I
would like to suppress such possibility.
The first think that I tried - set "TabStop" to False.
Also at the article "Control.KeyDown Event " I found such text:
"To handle keyboard events only at the form level and not allow other
controls to receive keyboard events, set the KeyPressEventArgs.Handled
property in your form's KeyPress event-handling method to true.
Certain keys, such as the TAB, RETURN, ESCAPE, and arrow keys are
handled by controls automatically. In order to have these keys raise
the KeyDown event, you must override the IsInputKey method in each
control on your form. The code for the override of the IsInputKey
would need to determine if one of the special keys is pressed and
return a value of true. "
The problem is that I can not find place where (how) I have to
overriding the IsInputKey method. Or is it wrong way?
Maybe somebody has an another idea how fix such problem.
Thanks