>>Hi !
>> I have a form with Keypress Code... Everything was fine... I add ThisForm.Hide() and ThisForm.Show() in a Command Button and now my Keypress event does not react anymore !!! I have to click first on my form to have this Keypress event again...
>>
>>I've tried to add SetFocus, Keypreview... No way !
>>
>>Thanks !
>>
>>Gilles
>
>Gilles,
>
>After you show the form you must setfocus tio a control in the form in order for the form to receive focus. A form's keypress will only fire if that form is the active form.
Thanks, but sorry to answer that even if I SetFocus to a control in my form... No way... The only possible solution for the moment is to click inside the window and then it traps my Keypress event (ESC key) !! Strange !!
Gilles