Results 1 to 6 of 6

Thread: Keyascii value on lostfocus event ?

  1. #1

    Thread Starter
    Hyperactive Member shirishdawane's Avatar
    Join Date
    Dec 2004
    Location
    Mumbai,India
    Posts
    363

    Exclamation Keyascii value on lostfocus event ?

    Hello All,

    If I want to check keyascii value of Tabkey, upkey & downkey then how can check it on lostfocus event ?
    On Error GoTo http://www.vbforums.com

    Note :
    1) Please use [vbcode]your code goes in here [/vbcode] tags when posting VB code.
    2) Please mark thread as Resolved using the Thread Tools menu, if you got solution.

  2. #2
    Hyperactive Member umilmi81's Avatar
    Join Date
    Sep 2005
    Location
    Sterling Heights, Mi.
    Posts
    335

    Re: Keyascii value on lostfocus event ?

    I don't know. But the "validate" event was designed specificly for tabbing out of a field.

  3. #3
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: Keyascii value on lostfocus event ?

    Quote Originally Posted by shirishdawane
    Hello All,

    If I want to check keyascii value of Tabkey, upkey & downkey then how can check it on lostfocus event ?
    these keys do not have any ASCII value. are you looking for KeyCode values?
    Show Appreciation. Rate Posts.

  4. #4
    Addicted Member makster246's Avatar
    Join Date
    Dec 2004
    Location
    nottingham
    Posts
    187

    Re: Keyascii value on lostfocus event ?

    This can be down using the
    "getkeystate" API.

    if you do a quick search on these forums for "getkeystate" you should find somethign useful,
    i would help further but i aint at my own pc.

    rob

  5. #5
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: Keyascii value on lostfocus event ?

    Quote Originally Posted by makster246
    This can be down using the
    "getkeystate" API.

    if you do a quick search on these forums for "getkeystate" you should find somethign useful,
    i would help further but i aint at my own pc.

    rob
    makster246,

    getkeystate API specifies if the key is up, down, or if toggled on/off.

    Quote Originally Posted by Allapi.net
    The GetKeyState function retrieves the status of the specified virtual key. The status specifies whether the key is up, down, or toggled (on, off - alternating each time the key is pressed).
    Show Appreciation. Rate Posts.

  6. #6
    Lively Member
    Join Date
    Nov 2005
    Posts
    72

    Re: Keyascii value on lostfocus event ?

    dear shirishdawane
    you can check keycode of all those key since they don't have keyAscii value.
    key value key code
    TAB 9
    up key 38
    down key 40
    left key 37
    right key 38

    u'll have to store those values at keydown event and then check it on lost focus event.

    Thank n Regards
    Uttam Kumar
    __________________________________
    be the best,help other to be the best

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