|
-
Oct 4th, 2003, 04:49 PM
#1
Thread Starter
Member
Alternative to Timer
Noticed that there is no Timer function in .NET now, so what can I use instead? I just want something to do animation with so it doesn't really matter as long as it counts up at a reliable pace
-
Oct 4th, 2003, 05:36 PM
#2
Actually there are two in .NET. There should be one in your components then there is a faceless one as well.
-
Oct 5th, 2003, 07:07 AM
#3
yay gay
actually there are 3:
one in System.Threading namespace
other in System.Timers namespace
another in System.Windows.Forms namespace
\m/  \m/
-
Oct 5th, 2003, 02:10 PM
#4
Sleep mode
Originally posted by Edneeis
Actually there are two in .NET. There should be one in your components then there is a faceless one as well.
1-Components tab [this for services and control making]
2-Windows Forms tab [use this with windows app] .
-
Oct 6th, 2003, 03:17 PM
#5
Thread Starter
Member
Ok I took a look at the Timer class and as far as I saw it only throws events. Now Im doing a directX program so I don't really want to go with a control. All I need is something that constantly counts up in milliseconds. I've try now.milliseconds but it only counts up to 1000 then starts over. Is there now way to get the number of milliseconds from 12:00 AM of that days or somthing??
-
Oct 6th, 2003, 03:21 PM
#6
yay gay
Originally posted by Cs30Man
Ok I took a look at the Timer class and as far as I saw it only throws events. Now Im doing a directX program so I don't really want to go with a control. All I need is something that constantly counts up in milliseconds. I've try now.milliseconds but it only counts up to 1000 then starts over. Is there now way to get the number of milliseconds from 12:00 AM of that days or somthing??
Environment.GetTickCount
\m/  \m/
-
Oct 6th, 2003, 03:23 PM
#7
-
Oct 6th, 2003, 03:44 PM
#8
How about something like this:
VB Code:
Dim span As TimeSpan = Now.Subtract(Date.Parse(Now.Today & " 12:00 AM"))
MsgBox(span.TotalMilliseconds)
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
|