1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development Ascii value of windows key

Discussion in 'Software' started by Guest-2867, 29 Nov 2004.

  1. Guest-2867

    Guest-2867 Guest

    Anyone know the ascii value of the windows key on your keyboard or any other way of reffering to it using inkey in vb6 ?

    ta for the help in advance :thumb:
     
  2. ellism

    ellism What's a Dremel?

    Joined:
    10 Sep 2003
    Posts:
    348
    Likes Received:
    0
    well its easy enough to find out, use the on key press to capture the value, and use the value it outputs.
     
  3. DeX

    DeX Mube Codder

    Joined:
    22 Jul 2002
    Posts:
    4,152
    Likes Received:
    3
    Actually keys like the Windows key don't have an ASCII value. Only keys that are 'printable' have an ASCII value. To detect keys like the Windows key you have to use either the KeyDown or KeyUp events and use the KeyCode to detect which key was pressed. You can find the values for KeyCodes on MSDN.
     
  4. TheAnimus

    TheAnimus Banned

    Joined:
    25 Dec 2003
    Posts:
    3,214
    Likes Received:
    8
    from memory, i swear i've got it of the WM_CHAR msg dex?

    But if you're wanting to detect it, remeber its ment to be for hotkey type things, (user interface 101). So say u wanted windowskey + o to do something it would be best to use the RegisterHotKey function.
     
  5. djengiz

    djengiz Pointless.

    Joined:
    16 Aug 2002
    Posts:
    1,129
    Likes Received:
    0
    On the KeyDown event its number 93 (in VB)

    Private Sub txt_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 93 Then
    msgbox "93"
    End If
    End Sub
     

Share This Page