Results 1 to 4 of 4

Thread: [RESOLVED] Keys to Char?

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2006
    Posts
    35

    Resolved [RESOLVED] Keys to Char?

    Hi,

    In KeyDown event, one can check the pressed key by looking at e.KeyValue/KeyCode, but since there are two sets of numeric keys (one is in the keypad and another is above the letter keys), they have differencen KeyCode, e.g. for number "1", e.KeyCode would either equals to Keys.D1 or Keys.NumPad1. What I'm interested is only the char "1", so is there any efficient way to obtain a single char for the key that being pressed?

    I tried
    KeyInChar = Convert.ToChar(e.KeyValue)
    but it is not correct

    Any help would be appreciated!
    Last edited by LazNiko; Dec 5th, 2006 at 11:38 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width