I saw several examples on handling TAB Key press.
Example:
Procedure CMDialogKey(var Message: TCMDialogKey);message CM_DIALOGKEY;
Procedure TForm1.CMDialogKey(var Message: TCMDialogKey);
begin
if CharCode = VK_TAB then begin
{Process the Alt+Tab key here}
Message.result := 1;
exit;
end;
inherited;
end;
May I know what do Message.result := 1 actually do ? Why 1 and NOT 0, 2 or
other number ?
Please help :)
Tan Chin Leong
It tells Delphi that the message has been handled. If you set Result
to 0, Delphi will continue to try to find some other handler for the
message event.
Good luck.
Kurt