Board index » cppbuilder » Common KeyDown Event Handler

Common KeyDown Event Handler

Hi.
I want to add Key Event handler to my program.
But a C++ builder has too many Key Event handler. every componet has it.
I want to have only on entry point to process key event.

How can I write keyboard message handler to do this?

 

Re:Common KeyDown Event Handler


Quote
Wuncheol Heo wrote:

> Hi.
> I want to add Key Event handler to my program.
> But a C++ builder has too many Key Event handler. every componet has it.
> I want to have only on entry point to process key event.

> How can I write keyboard message handler to do this?

Set the Form KeyPreview to true, and use FormOnKeyDown to process your
entries.  This can slow your programme down: you might want to set
KeyPreview true only when you need the handlers.

Cheers,
--
Michael Lockey
director, Hartlepool Systems International
note: $10.00 fee (US) for all unsolicited spam mail.  This includes all
mail that is not either specifically requested, or a personal
communication.  By sending me anything that may qualify as spam, you
have agreed to the terms and conditions of my service.  If in any doubt,
you may send me an enquiry as to whether or not your message will be
construed as Spam.  There is no charge for this service.

Other Threads