利用Api函数计算Windows从启动后所运行的总
2006-02-27 11:45:54 来源:WEB开发网核心提示:PRivateDeclareFunctionGetTickCountLib"kernel32"()AsLongPrivateSubTimer1_Timer()DimhourAsIntegerDimminuteAsIntegerDimsecondAsIntegerhour=GetTickCount\1
PRivateDeclareFunctionGetTickCountLib"kernel32"()AsLong
PrivateSubTimer1_Timer()
DimhourAsInteger
DimminuteAsInteger
DimsecondAsInteger
hour=GetTickCount\1000\60\60
Label1.Caption=Str(hour) "小时"
minute=(GetTickCount-hour*60*60*1000)\1000\60
Label2.Caption=Str(minute) "分钟"
second=(GetTickCount-Val(Label1.Caption)*60*60*1000-Val(Label2.Caption)*60*1000)\1000
Label3.Caption=Str(second) "秒钟"
EndSub->
PrivateSubTimer1_Timer()
DimhourAsInteger
DimminuteAsInteger
DimsecondAsInteger
hour=GetTickCount\1000\60\60
Label1.Caption=Str(hour) "小时"
minute=(GetTickCount-hour*60*60*1000)\1000\60
Label2.Caption=Str(minute) "分钟"
second=(GetTickCount-Val(Label1.Caption)*60*60*1000-Val(Label2.Caption)*60*1000)\1000
Label3.Caption=Str(second) "秒钟"
EndSub->
更多精彩
赞助商链接