龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 软件开发 > VB开发 >

利用Api函数计算Windows从启动后所运行的总

时间:2009-12-30 15:42来源:未知 作者:admin 点击:
分享到:
PrivateDeclareFunctionGetTickCountLib"kernel32"()AsLong
  
  PrivateSubTimer1_Timer()
  DimhourAsInteger
  DimminuteAsInteger
  DimsecondAsInteger
  hour=GetTickCount10006060
  Label1.Caption=Str(hour) "小时"
  
  minute=(GetTickCount-hour*60*60*1000)100060
  Label2.Caption=Str(minute) "分钟"
  
  second=(GetTickCount-Val(Label1.Caption)*60*60*1000-Val(Label2.Caption)*60*1000)1000
  Label3.Caption=Str(second) "秒钟"
  EndSub->

精彩图集

赞助商链接