Du kan jo selv prøve, her er koden til en api timer hvis du ikke har den, men jeg vil tro at det er det noget af det samme. :-)
\'----------------------------- Module1 ----------------------------- 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
Dim lCount As Long
\'Timer Sub TimerProc(ByVal hwnd As Long, ByVal nIDEvent As Long, _ ByVal uElapse As Long, ByVal lpTimerFunc As Long)
lCount = lCount + 1 Form1.Caption = lCount End Sub
Function TimerStart(hwnd As Long, milsec As Long) SetTimer hwnd, 0, milsec, AddressOf TimerProc End Function
Function TimerStop(hwnd As Long) KillTimer hwnd, 0 End Function \'----------------------------- Module1 -----------------------------
\'----------------------------- Form1 ----------------------------- Private Sub Form_Load() TimerStart Me.hwnd, 1000 End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) TimerStop Me.hwnd End Sub \'----------------------------- Form1 -----------------------------
er det et vædemål eller er det bare for at spare på system resourcer ? interessant :| det har jeg aldrig tænkt over. jeg bruge altid timer-kontrollen for at spare på koderne :)
simon_jacobsen, det er for at spare på system resourcer. Jeg har lavet en meget effektiv timer funktion til mig program og det er som nemt nok at bruge...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.