Re: Capture F5 Keystroke
From: Donald (donn_at_1starnet.com)
Date: 11/26/03
- Next message: Ndi: "Re: Are Variants slow(ish)?"
- Previous message: Ndi: "Re: Modularization - Packages, DLLs, COM - Which is best?"
- In reply to: BruSoft: "Re: Capture F5 Keystroke"
- Next in thread: Ignacio Vazquez: "Re: Capture F5 Keystroke"
- Reply: Ignacio Vazquez: "Re: Capture F5 Keystroke"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 25 Nov 2003 21:28:52 -0600
This code does not work.
Ideas?
procedure TfrmMain.FormKeyPress(Sender: TObject; var Key: Char);
begin
if key = 'VK_F5' then
begin
ShowMesage('The F5 key was pressed!','');
end;
end;
"BruSoft" <bruce@bru-soft.com> wrote in message
news:3fc41bb9$1@newsgroups.borland.com...
> Donlad wrote:
>
> >Can some help figure out how to capture if F5 is pressed.
> >
> >
> Key is passed to the OnKeyUp, OnKeyDown, etc. events. Check if Key
> = VK_F5
>
> >
> >secondly when the users closes the app clicking the x in the top right,
how
> >do I show a message box asking are you sure. I can display the message
box,
> >but not sure how to cancel the terminate.
> >
> >
> In the OnCloseQuery event on the form put your message box and if
> you want to cancel the close, set the CanClose parameter sent into the
> event to False.
>
> >
> >Thanks
> >
> >Donald
> >
> >
> >
> >
>
>
> --
> Bruce Michener http://www.bru-soft.com
>
- Next message: Ndi: "Re: Are Variants slow(ish)?"
- Previous message: Ndi: "Re: Modularization - Packages, DLLs, COM - Which is best?"
- In reply to: BruSoft: "Re: Capture F5 Keystroke"
- Next in thread: Ignacio Vazquez: "Re: Capture F5 Keystroke"
- Reply: Ignacio Vazquez: "Re: Capture F5 Keystroke"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|