chachote
asked on
Use ENTER instead of TAB
what can I do to use ENTER instead of the TAB key to switch from one component to another (for instance Edits).
My Users prefer it that way.
My Users prefer it that way.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This will make the for act exactly as if a tab were pressed:
{Add this to KEYdown event handler for all controls you wish to use enter key}
if (key=13) then postmessage(handle,WM_KeyD own,VK_TAB ,0);
Good luck!!
{Add this to KEYdown event handler for all controls you wish to use enter key}
if (key=13) then postmessage(handle,WM_KeyD
Good luck!!
ASKER
Barry
This is good but your next was the best
This is good but your next was the best
ASKER
All answers work, But Barry's is the
best!
Now I improved it by writing it on the Form's OnKeyPress Event, then choose that event for the OnKeyPress event of the controls I want.
best!
Now I improved it by writing it on the Form's OnKeyPress Event, then choose that event for the OnKeyPress event of the controls I want.
on your tedits or whatever OnKeyPress event do
If key=chr(13) then
SendMessage(handle,WM_NEXT
Regards Barry