|
-
May 27th, 2008, 05:45 PM
#7
Thread Starter
Hyperactive Member
Re: dispatchtimer to work in vb.net?
NO it just runs the code once .
The timer is not running every interval set.
I am not adding a timer with an event properly as shown below as i dont know how to do.
Dim dt As DispatcherTimer
Private Sub mybutton_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles mybutton.Click
dt = New DispatcherTimer
dt.Interval = TimeSpan.FromMilliseconds(20)
' Dim MainGameLoop As EventHandler
' AddHandler dt.Tick, MainGameLoop
dt.start()
MainGameLoop() 'just runs once
End Sub
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
|