getting the Pressed Key in the KeyPress event

Discussion in 'Questions (Windows Mobile)' started by Cableguy, Sep 5, 2008.

  1. Cableguy

    Cableguy Expert Licensed User


    Been playing around with the door lib, trying to make sense of it, and how to expose some controls events...

    I've been able to expose a keypress event, but how can I know what key was pressed...
    I want to be able to "read the hole keyboard...
  2. agraham

    agraham Expert Licensed User

    Look in the Door help for Event.Data. That's got the EventArgs for the event in it. Google for its members.
    Sub KeyPressEvent_NewEvent
        o.Value =KeyPressEvent.Data 
    'Get the event's KeyPressEventArgs
        KeyChar = o.GetProperty("KeyChar "'Returns the character
    End Sub
    You will get more information from the KeyUp or KeyDown events which return a KeyEventArgs object - more Googling :)
  3. Cableguy

    Cableguy Expert Licensed User

    I got it working...

    My main problem was how to retrieve the info...
    then I found you litle text help on trhe door thread, wich made it clear...
    Thanks Andrew...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice