I have created an application that uses the GetTickCount function, of the windows API, to make the application pause for a number of seconds. It works fine under windows 2k, but when i run it under WinNT it doesn't seem to pause(ie ignores the GetTickCount bit). Is there any reason for this?
my code is:
Private Declare Function GetTickCount Lib "kernel32" () As Long
Function pause()
Dim starttime as long
Dim endtime as long
starttime = GetTickCount
endtime = 0
'wait 5 seconds
Do Until (endtime - starttime) > 5000
endtime = GetTickCount
Loop
End function
Neil
my code is:
Private Declare Function GetTickCount Lib "kernel32" () As Long
Function pause()
Dim starttime as long
Dim endtime as long
starttime = GetTickCount
endtime = 0
'wait 5 seconds
Do Until (endtime - starttime) > 5000
endtime = GetTickCount
Loop
End function
Neil