What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Visual Basics : Uptime

1 votes - 5 average   Visual Basics : Uptime
Author: Message:
Sk3tch
Veteran Member
*****

Avatar
We are Samurai, the keyboard cowboys

Posts: 1675
Reputation: 4
38 / Male / –
Joined: Jul 2003
RE: Visual Basics : Uptime
this is what i used for my system info plug:
code:
Private Declare Function GetTickCount& Lib "kernel32" ()

Private Function WinUpTime()
    Dim Secs, Mins, Hours, Days
    Dim TotalMins, TotalHours, TotalSecs, TempSecs
    Dim CaptionText
    TotalSecs = Int(GetTickCount / 1000)
    Days = Int(((TotalSecs / 60) / 60) / 24)
    TempSecs = Int(Days * 86400)
    TotalSecs = TotalSecs - TempSecs
    TotalHours = Int((TotalSecs / 60) / 60)
    TempSecs = Int(TotalHours * 3600)
    TotalSecs = TotalSecs - TempSecs
    TotalMins = Int(TotalSecs / 60)
    TempSecs = Int(TotalMins * 60)
    TotalSecs = (TotalSecs - TempSecs)


    If TotalHours > 23 Then
        Hours = (TotalHours - 23)
    Else
        Hours = TotalHours
    End If


    If TotalMins > 59 Then
        Mins = (TotalMins - (Hours * 60))
    Else
        Mins = TotalMins
    End If
   
    If Hours = 0 Then
        CaptionText = Mins & " Minutes, " & TotalSecs & " seconds" & vbCrLf
    ElseIf Days = 0 Then
        CaptionText = Hours & " Hours, " & Mins & " Minutes, " & TotalSecs & " seconds" & vbCrLf
    Else
        CaptionText = Days & " Days, " & Hours & " Hours, " & Mins & " Minutes, " & TotalSecs & " seconds" & vbCrLf
    End If
    WinUpTime = CaptionText
End Function

not sure if will help you but :P....

should make sense :)
Sk3tch@Microsoft.com - Email
- 53 6B 33 74 63 68 34 64@hotmail.com - Messenger
06-24-2004 02:49 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Visual Basics : Uptime - by dotNorma on 06-23-2004 at 09:13 PM
RE: Visual Basics : Uptime - by Choli on 06-23-2004 at 09:34 PM
RE: Visual Basics : Uptime - by dotNorma on 06-23-2004 at 09:46 PM
RE: Visual Basics : Uptime - by Mnjul on 06-24-2004 at 01:06 AM
RE: RE: Visual Basics : Uptime - by Salem on 06-25-2004 at 03:43 PM
RE: Visual Basics : Uptime - by Sk3tch on 06-24-2004 at 02:49 AM
RE: Visual Basics : Uptime - by Choli on 06-24-2004 at 09:51 AM
RE: Visual Basics : Uptime - by dotNorma on 06-25-2004 at 04:00 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On