Results 1 to 3 of 3

Thread: Timer API (NO FORM)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2001
    Location
    Between 2 bosses
    Posts
    210

    Timer API (NO FORM)

    I need to uses an api timer, one which will have no interaction with a form. All the code should be at a module level.

    So, using a reference to a forms hwnd to hook a timer into will NOT work. I believe that the final answer will amount to using the sleep, but I was hoping someone here might have some info on an api for this.

    Thanks in advance

  2. #2
    New Member
    Join Date
    Nov 2001
    Location
    Israel
    Posts
    14

    I hope this will help

    Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
    Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long

  3. #3
    Fanatic Member
    Join Date
    Sep 2000
    Location
    UK.
    Posts
    728

    Smile Info.

    Just pass the Hwnd parameter of SetTimer as NULL. Check out MSDN for more information.
    Digital-X-Treme
    Contact me on MSN Messenger: [email protected]

    [VBCODE]Debug.Print Round(((1097) - ((55 ^ 5 + 311 ^ 3 - 11 ^ 3) _
    / (68 ^ 5))) ^ (1 / 7), 13)[/VBCODE]

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