KeyDown Event of Form Not working when Datacombo Control got focus 
Author Message
 KeyDown Event of Form Not working when Datacombo Control got focus

Hi

I have encountered a problem for handling event.

In an application, I want to make the open form to be closed by pressing the
ESC key. So I have written some event handling code that

make use of the Keydown event of the form to check if the keycode is equal
to 27 (Esc key) and then unload the form. I have set

the KeyPreview property of the form to true. However if there is a combo box
on the form and it got the focus, the event will not be fired.

I have tried another way to implement the behavior by just setting the
cancel property of a cancel button to true. The result is the same.

Can anyone know the proper way to handling this or there is another way to
implement this behavior ?

Thanks a lot
Ivan



Mon, 14 Jun 2004 14:59:28 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. KeyDown/Up events not firing even if child form appears to have focus

2. Focus events not working on MDI forms???

3. textbox validate event not being fired when sstab controls gets focus

4. KeyDown/Up not fired even if child form appears to have focus

5. ???Detecting KeyDown when form not in focus???

6. form not getting focus/control

7. KeyDown and KeyUp events not working

8. KeyDown event not firing for form with KeyPreview = True

9. ActiveX control in browser not getting focus

10. KeyDown, KeyPress, KeyUp events won't work

11. Do KeyDown Events work in Active X Documents?

12. Do KeyDown Events Work in Internet Explorer?

 

 
Powered by phpBB® Forum Software