KeyPress Events on Forms

KeyPress Events on Forms

Anonymous
Not applicable
554 Views
1 Reply
Message 1 of 2

KeyPress Events on Forms

Anonymous
Not applicable
Hi,
Has anyone else had a problem getting the KeyPress, KeyUp, or KeyDown
events to be recognized by a form with controls on it? Individual controls
handle the event as expected, but not the form. Any insight would be
greatly appreciated!

Cheers,
Alan Rennick
0 Likes
555 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
To capture the key events, the object must have the focus. When a form
contains controls, it can't obtain the focus. (If you set the TabStop
property of every control to False, the form will initially capture key
events, but can't get them once you click on any control). Is there a
specific reason you need this?

Neil

"Alan Rennick" wrote in message
news:09541575F798E775939CBF03C6E8679F@in.WebX.maYIadrTaRb...
> Hi,
> Has anyone else had a problem getting the KeyPress, KeyUp, or KeyDown
> events to be recognized by a form with controls on it? Individual
controls
> handle the event as expected, but not the form. Any insight would be
> greatly appreciated!
>
> Cheers,
> Alan Rennick
>
>
0 Likes