In my application I use tabs, my own component, like Google chrome sort of. Each tab reference an explorer component so it is basicly a tabbed browser/explorer. My problem is that I want to use CTRL+ TAB and CTRL+SHIFT +TAB to navigate tabs. Setting forms.KeyPreview will not help since the tab key is special key. How can I, in an easy way, add support for my navigation wish. I can modify component if needed. My component is based on TCustomControl if that helps.
Kind Regards
Roy M Klever
Tab, like the arrow keys, enter and escape are a special keys used in dialog navigation. When a control would like to receive those keys it has to indicate so by responding to WM_GETDLGCODE. Like this code below. Then you will receive a KeyDown event when Tab is pressed.
Also see here and here.
PS: And make sure your control has focus or you will receive nothing at all (if CanFocus then SetFocus; in MouseDown).