|
-
Mar 13th, 2004, 02:01 AM
#1
Thread Starter
Member
Clockwork
Im sure you're all getting annoyed with my questions by now, but heres another one.
Is it possible for me to use a timer or something along those lines to create a clock that stay's accurate with my system time? So like, when i close it and reopen it it wont start over, but instead will find my system time and be in check with that still?
Not sure if my question is worded right, but if you understand what im asking for and have a solution, and a little free time. Dont hesitate to reply and tell me how annoying im getting 
---Flac
Everything great once started with the words "That will never catch on, you shouldnt even bother" be great, go against the crowed, do something stupid, you might become famous.
-
Mar 13th, 2004, 02:23 AM
#2
look at System.DateTime.Now(). It will give you the current date and time (of your system). look in DateTime for more stuff
ie:
System.DateTime.Now().ToShortTimeString
String.Format("{0:hh:mm:ss}", System.DateTime.Now())
etc...
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Mar 13th, 2004, 12:15 PM
#3
Frenzied Member
That's the way to do it, but just to add to MrPolite's suggestion, add a timer, set the interval to whatever you want, then update whatever you're displaying with Now.
I do this in an app where I show the time in a panel in a status bar, down to the seconds. Timer's interval is 1000 milliseconds.
Mike
-
Mar 13th, 2004, 12:21 PM
#4
Addicted Member
but timer's not synchronized with the second ticks of the system clock
i'm thinking you could prolly use a thread to detect a change in seconds of the system clock, then update.
(don't do what i said. timer's good enough)
oh never mind. i was confused. i guess setting timer's interval to like 100 will be precise enough. i was thinking a loop.
[vbcode]
Me.Hide()
[/vbcode]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|