I have an tabControl1 in my form with three TabPages named TabPage1, TabPage2 and TabPage3.
When TabPage 2 has focus I need to raise an key event (arrow keys for navigation).
This event should not be raised in the other TabPages.
Anybody know how?
ceventskeytabcontrol
I have an tabControl1 in my form with three TabPages named TabPage1, TabPage2 and TabPage3.
When TabPage 2 has focus I need to raise an key event (arrow keys for navigation).
This event should not be raised in the other TabPages.
Anybody know how?
Best Answer
On Selected event handler you can cast the sender to the proper control and check for it's name. If the event is generated from TabPage2 you can fire the key event.
Something like this