Jean-Marc
Here is the sample code
==============================================
' This goes in the general declarations bas module
'
Public Declare Function GetTickCount Lib "kernel32" () As Long
==============================================
' Now this is the form code
==============================================
Option Explicit
Private Sub Form_Click()
Static LastCnt As Long
Static ThisCnt As Long
Dim TimeElapsed As Long
If LastCnt = 0 Then
LastCnt = GetTickCount()
End If
ThisCnt = GetTickCount
TimeElapsed = ThisCnt - LastCnt
MsgBox TimeElapsed & " seconds have elapsed since last click", vbOKOnly
+ vbInformation
End Sub
--
Regards,
Moin Ul Haque
moin_u...@hotmail.com
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
"Jean-Marc" <jean...@nospam.com> wrote in message
news:uJ0Qcce$BHA.1880@tkmsftngp02...
Regards,
Moin Ul Haque
moin_u...@hotmail.com
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
"Moin Ul Haque" <moin_u...@hotmail.com> wrote in message
news:u7YPQ7j$BHA.2044@tkmsftngp04...
--
Regards,
Moin Ul Haque
moin_u...@hotmail.com
03008...@mobilinkgsm.com
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
"Jean-Marc" <jean...@nospam.com> wrote in message
news:uJ0Qcce$BHA.1880@tkmsftngp02...
You should use the timeGetTime API. GetTickCount does not provide mS
resolution (claims aside). While GetTickCount returns the number of mS in a
granular fashion, its resolution varies from 10 to 55 mS.
Public Declare Function timeGetTime Lib "winmm.dll" () As Long
--
Richard Grier (Microsoft Visual Basic MVP)
See www.hardandsoftware.net for contact information.
Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
--
The scalable ASP Session replacement for webfarms
http://www.nieropwebconsult.nl/asp_session_manager.htm
"Dick Grier" <dick_gri...@msn.com> wrote in message
news:Oc7E1Qo$BHA.1836@tkmsftngp05...
> Is there anyone who knows how to count milliseconds in VB6 ?
And I suppose you're going to want the answer RightNow, huh?
URL:http://groups.google.com/groups?selm=%23kmFSP1tBHA.2676%40tkmsftngp04
URL:http://groups.google.com/groups?selm=eIFcts0qBHA.2080%40tkmsftngp03
However, you might get millisecond precision, but not millisecond accuracy!
URL:http://groups.google.com/groups?selm=3CB4D43B.23B3%40cluestick.org
(For anyone who might be a bit fuzzy about the difference between precision
and accuracy, contemplate this: 2 + 2 = 3.141590008675309000090210000666 )
--
Joe Foster <mailto:jlfoster%40znet.com> Space Cooties! <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above They're coming to
because my cats have apparently learned to type. take me away, ha ha!
The problem with the Performance Counters is that they advertize much better
resolution than they provide. Their accuracy varies a LOT with system
loading, and is not even close to the advertized resolution.