OnKeyDown event?

F-IN-BOX for Delphi / Builder C++ / VCL
Guest

OnKeyDown event?

Postby Guest » Mon Sep 19, 2005 9:41 pm

I have embedded the flash player control in my form and it works wonderfully! However, I notice that there is no OnKeyDown event like there is for a TForm. I'd like to be able to process a keypress in my form (because the Flash I am showing should not be interactive).

Is it possible to raise an event on a keypress and pass it through to a procedure in my program for handling it?

Thanks!

Guest

Never mind, solved my own problem when I came to work today

Postby Guest » Tue Sep 20, 2005 1:35 pm

Two solutions exist to this problem. The easier solution is to set KeyPreview in my form and then do a OnKeyDown event in my form, as normal. However, this doesn't necessarily capture all the keys on the form. The better solution is to set the Application.OnMessage event to a function and check for the keys I want on every WM_KEYDOWN message. I am using this one, as I need to capture arrow keys.


Return to “Delphi / Builder / VCL Edition”

Who is online

Users browsing this forum: No registered users and 23 guests

cron