|
-
Feb 21st, 2004, 10:45 PM
#1
Thread Starter
Junior Member
showing/hiding multiple picboxes in one timer
i'm making a game project for VB.NET class and i really need to know how to put multiple picboxes into one timer. Like show them then hide them. without using 10000000 timersex how do u combine these 2 timers into 1
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
picMove2.Left = picMove1.Left + x
picMove1.Left = picMove2.Left + x
picMove1.Hide()
picMove2.Show()
Timer2.Enabled = False
Timer3.Enabled = True
End Sub
Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
picMove3.Left = picMove2.Left + x
picMove1.Left = picMove3.Left + x
picMove2.Hide()
picMove3.Show()
Timer3.Enabled = False
Timer4.Enabled = True
End Sub
plz help thx
-
Feb 23rd, 2004, 07:52 AM
#2
Fanatic Member
Instead of timers, maybe you should have one or just a few, but then use events to trigger other action, or call a method that will determine what to do. You could also have threads that continuously check the state of a variable (like dirty or picMove2.visible) and that would take action or call a method if the state changes.
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
|