I should have said

     if (Key = VK_RETURN) and (ssCtrl in Shift) then ....

I must be getting old :-(

Mind you the other way is useful for any key as it looks at the state of the
key at the time the API call is executed so you can use any key
combinations. In fact by using GetKeyboardState you should be able to use
whole handfuls of key combinations !!

-----Original Message-----
From: Paul Lowman <[EMAIL PROTECTED]>
Date: Tuesday, 30 March 1999 09:56
Subject: Re: [DUG]: Trapping and using a CTRL-ENTER

>Mark try this (or something like it)
>procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word;
>  Shift: TShiftState);
>     if (Key = VK_RETURN) and (GetKeyState(VK_CONTROL) and $80 <> 0) then
>     begin
>            // do stuff
>     end;

    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]

Reply via email to