keyboard capture

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Emil

    keyboard capture

    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) 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.


  • Vijaye Raji

    #2
    Re: keyboard capture

    Add this to your form and try:

    protected override bool IsInputKey(Keys keyData)
    {
    return true;
    }

    HTH
    -vj

    "Emil" <emil1983@op.pl > wrote in message
    news:d5s6vb$jkg $1@nemesis.news .tpi.pl...[color=blue]
    > 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) 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.
    >
    >[/color]


    Comment

    • Alan Pretre

      #3
      Re: keyboard capture

      "Emil" <emil1983@op.pl > wrote in message
      news:d5s6vb$jkg $1@nemesis.news .tpi.pl...[color=blue]
      > What should I do ?[/color]

      Did my suggestion to you in that other post yesterday not work? If not,
      what is wrong?

      -- Alan


      Comment

      Working...