|
-
May 27th, 2008, 07:10 AM
#1
Thread Starter
Hyperactive Member
dispatchtimer to work in vb.net?
I cant get the dispatchtimer to work in vb.net.
I want the MainGameLoop() code to run every 20MS after i click abutton but this doesnt do that.
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
MainGameLoop() 'just runs once
End Sub
Private Sub MainGameLoop()
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
|