Results 1 to 3 of 3

Thread: Yet another question :-)

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Åsa, -, Sweden
    Posts
    14
    So far I've only been asking a lot of questions but I hope that I'll one day be able to answer some questions instead.
    I asked a while ago how I could get a program to notice when you press a key no matter which program is active and that worked great, now I want to know if there's any way to activate the numlock when a program starts (that's probably the best way) or if anyone knows how to make a program catch the clicks without having the numlock active ??
    (Would prefer the first method but it would be fun to see the solution to #2 as well)
    Thx for the help yesterday and for whatever help I'll get today.

  2. #2
    New Member
    Join Date
    Jul 2000
    Posts
    15

    Lightbulb Have al

    have a look at these

    http://vbapi.com/ref/g/getkeystate.html

    and

    http://vbapi.com/ref/s/setkeyboardstate.html

    by the way... use this

    const VK_NUMLOCK = &H90
    If practice makes perfect...

    and nobody's perfect...

    why the hell practice?

  3. #3
    Guest
    Try this.

    Make a Form with a Timer and set it's Interval to 1.

    Code:
    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
    
    Private Sub Timer1_Timer()
    
        'If NumLock is pressed then Beep
        If GetAsyncKeyState(vbKeyNumlock) Then Beep
        
    End Sub

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