Private Declare Function GetTickCount Lib "kernel32" () As Long
Private Sub Timer1_Timer()Dim hour As IntegerDim minute As IntegerDim second As Integerhour = GetTickCount \ 1000 \ 60 \ 60Label1.Caption = Str(hour) + "小时"
minute = (GetTickCount - hour * 60 * 60 * 1000) \ 1000 \ 60Label2.Caption = Str(minute) + "分钟"
second = (GetTickCount - Val(Label1.Caption) * 60 * 60 * 1000 - Val(Label2.Caption) * 60 * 1000) \ 1000Label3.Caption = Str(second) + "秒钟"End Sub
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18