Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

not getting key press events

0 views
Skip to first unread message

David Thielen

unread,
Nov 8, 2009, 5:40:24 PM11/8/09
to
In my form (called using ShowDialog(hParent)) I have the following:

this.KeyPress += new
System.Windows.Forms.KeyPressEventHandler(this.SelectSelect_KeyPress);

I never get an event. Why?

thanks - dave


david@at-at-at@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm

CSharpner

unread,
Nov 11, 2009, 3:23:41 PM11/11/09
to
Are you trying to capture key presses on a particular component or on
the entire form?

http://csharpner.blogspot.com

On Nov 8, 5:40 pm, David Thielen <thie...@nospam.nospam> wrote:
> In my form (called using ShowDialog(hParent)) I have the following:
>
> this.KeyPress += new
> System.Windows.Forms.KeyPressEventHandler(this.SelectSelect_KeyPress);
>
> I never get an event. Why?
>
> thanks - dave
>

> david@at-at...@windward.dot.dot.net
> Windward Reports --http://www.WindwardReports.com
> me --http://dave.thielen.com
>
> Cubicle Wars -http://www.windwardreports.com/film.htm

David Thielen

unread,
Nov 12, 2009, 11:14:17 AM11/12/09
to
Entire form - I had to put this event on every control in the form -
yuck.

Per

unread,
Nov 21, 2009, 7:54:46 PM11/21/09
to

"David Thielen" <thi...@nospam.nospam> wrote in message
news:12dof5l2bnv1jqhc4...@4ax.com...

> Entire form - I had to put this event on every control in the form -
> yuck.
>

Try to set the KeyPreview-prop on the form to true.


-Per

0 new messages