Link to home
Start Free TrialLog in
Avatar of RIAS
RIASFlag for United Kingdom of Great Britain and Northern Ireland

asked on

navigate through tabpages by arrow keys

Hello,
How can I navigate between tabpages by arrow keys;  (Left and Right).
I am using vb.net 2015 desktop.

Cheers
ASKER CERTIFIED SOLUTION
Avatar of it_saige
it_saige
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RIAS

ASKER

Thanks you Sir! Worked like a charm!
If the focus is already on the tab, arrows are already correctly navigating to the next/previous tab.

Trying to handle the PreviewKeyDown or KeyDown event will likely conflict with other controls: e.g. Moving the cursor left/right in a TextBox.

If all the controls are read-only, then this won't be much of an issue. But if people are allowed to alter the data, then intercepting the arrow keys will interfere with standard navigation.

Instead, maybe you can just teach your users to use CTRL-TAB and CTRL-SHIFT-TAB which are the standard navigation keys for tabcontrols.
Avatar of RIAS

ASKER

Eric Spot on!! Thanks