views:

196

answers:

1

I have a form and I've passed its handle to the OpenGL class to draw. I want to get keyboard commands from the user but it seems the procedures for getting the keys doesn't run (I've tested it). Although, I am using OnMouseDown with no problem at all.

Is there anything I am missing here? Anyone has a solution?

+1  A: 

It's been ages since I used VCL (with C++Builder 3), but if it's still the same as in the old days, you might want to set KeyPreview on your form to True. That will cause the form to receive events that normally would only go to controls.

Thomas
Wow...Thanks a lot man! I didn't know that this property for the forms even existed!!... I should really reconsider my visual programming skills. :)You absolutely made my day. Thank you.
Flom Enol