VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



How long has windows been runningm in hours, minutes, seconds and milliseconds

by Jon R (1 Submission)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 13th March 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

How long has windows been runningm in hours, minutes, seconds and milliseconds

API Declarations


Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private TIME As Integer
Private lngReturn As Long
Private seconds As Integer
Private minutes As Integer
Private hours As Integer
Option Explicit

Rate How long has windows been runningm in hours, minutes, seconds and milliseconds



'http://personal.nbnet.nb.ca/lewisj/tpirfonts/shopspree.zip

Private Sub lbl2_Change()
Dim filename As String
Dim sound As Long
    filename = "C:\Documents and Settings\jon\Desktop\BEEPMETA.wav"
    sound = sndPlaySound(filename, 1)
End Sub


Private Sub tmr1_Timer()
    lngReturn = GetTickCount
    TIME = lngReturn / 1000
    minutes = ((lngReturn Mod 86400000) Mod 3600000) \ 60000
    hours = TIME / 3600
    seconds = TIME Mod 60
    lbl1.Caption = Format(minutes, "##00")
    lbl2.Caption = Format(seconds, "##00")
    lbl3.Caption = Format(hours, "##00")
    lbl5.Caption = Format(lngReturn, "##00") Mod 1000
End Sub

Download this snippet    Add to My Saved Code

How long has windows been runningm in hours, minutes, seconds and milliseconds Comments

No comments have been posted about How long has windows been runningm in hours, minutes, seconds and milliseconds. Why not be the first to post a comment about How long has windows been runningm in hours, minutes, seconds and milliseconds.

Post your comment

Subject:
Message:
0/1000 characters