In my TEdit field I have text in the form .
My idea is:
When a user enters the control using TAB from
Oh and in a Key Press event you can set the Key to 0
EDIT The following is a call stack capturing a KeyDown event for a TAB key
Form1.TForm1.GetTab((45061, 9, 0, 983041, 0))
:0101f444 TForm1.GetTab
:004dca20 TWinControl.WndProc + $500
:004ef754 TCustomForm.WndProc + $558
:004d86b3 TControl.Perform + $27
:004ded6a TWinControl.CNKeyDown + $D6
:004dca20 TWinControl.WndProc + $500
:004dc147 TWinControl.MainWndProc + $2F
:004306ea StdWndProc + $16
:7e418734 USER32.GetDC + 0x6d
:7e418816 ; C:\WINDOWS\system32\USER32.dll
:7e41b4c0 ; C:\WINDOWS\system32\USER32.dll
:7e41b50c ; C:\WINDOWS\system32\USER32.dll
:7c90eae3 ntdll.KiUserCallbackDispatcher + 0x13
:7e42f3cc USER32.SendMessageA + 0x49
As you can see it doesn go through KeyDown as normal keys do but instead calls BroadCast to send the message out....
So you'll need a message catcher
Procedure GetTab( var Message: TCMDialogkey ); message CM_DIALOGKEY;
to catch it.