L
ligi168
Hi!The api funtion "settimer" is all right used in windows xp/2003
server,but it will cause a conflict when it is used in windows nt 4.0
My code(vba) as following:
////////////////////////////////////////
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
Public Id_Timer As Long
Public Sub StarTimer()
Id_Timer = SetTimer(0, Id_Timer, 1000, AddressOf timeProc)
End Sub
Public Sub timeProc()
Application.StatusBar = Now
End Sub
//////////////////////////////////////////////
Thanks.
Agan
server,but it will cause a conflict when it is used in windows nt 4.0
My code(vba) as following:
////////////////////////////////////////
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
Public Id_Timer As Long
Public Sub StarTimer()
Id_Timer = SetTimer(0, Id_Timer, 1000, AddressOf timeProc)
End Sub
Public Sub timeProc()
Application.StatusBar = Now
End Sub
//////////////////////////////////////////////
Thanks.
Agan