I've written a simple application. It consists of main window, menu and a
label. I added event handler to the main form (KeyDown), so when I push a
key on the keyboard, then it's key code should be displayed using a label
(label.Text = e.KeyCode). It works fine with "A", "B" etc. but when I press
left arrow, up arrow etc, the main menu popups and KeyDown event is not
handled.
What should I do ?
PS. I use .NetFramework 2.0 Beta2. In .NetFramework 1.1 there wasn't such
problem.

Emil.

Re: keyboard capture by Rob

Rob
Thu May 12 07:38:11 CDT 2005

Try overriding the ProcessCmdKey method of the main form.

Rob.

"Emil" <emil1983@op.pl> wrote in message
news:d5rbnb$bo$1@nemesis.news.tpi.pl...
> I've written a simple application. It consists of main window, menu and a
> label. I added event handler to the main form (KeyDown), so when I push a
> key on the keyboard, then it's key code should be displayed using a label
> (label.Text = e.KeyCode). It works fine with "A", "B" etc. but when I
> press left arrow, up arrow etc, the main menu popups and KeyDown event is
> not handled.
> What should I do ?
> PS. I use .NetFramework 2.0 Beta2. In .NetFramework 1.1 there wasn't such
> problem.
>
> Emil.
>
>