Results 1 to 2 of 2

Thread: Facing problem with WINDOW API

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    INDIA
    Posts
    7
    hi,
    I am facing problem can anybody help me please.

    The problem is given below.

    What actually i want to do is that in the form i want to set timer using API in form load event for some 3 minute and if user does not press any key or does not
    move mouse then the set timer API will call procedure which will do certain activity.
    But i don't know how to Recognition keypress or mouse move thru API(Window API)And when it Recognition the mouse move or keypress then i want to call a procedure which will get executed when it finds that
    either a key is pressed or mouse move.But all this i
    want to do using API.

    THX


  2. #2
    Guest
    Here is how to detect keypresses and mouse clicks:

    Code:
    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
    
    Private Sub Timer1_Timer()    
    Dim iKey As Integer    
    For iKey = 0 To 255       
    If GetAsyncKeyState(iKey) Then Debug.Print iKey
    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