xTimer.Start
then
You should use xTimer.Tick event to move your button.
martonx
Junior Poster in Training
51 posts since May 2008
Reputation Points: 10
Solved Threads: 8
on timer tick event
- make randomize function to get new X and Y,so your button always get new location to moving every timer tick.
Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
Why would you want the timer to stop when you press the button to start the timer? lol. If you put the code to move the button in the timer_tick event, as you should have already, you just need to stop the timer like this.
Private Sub TimeStartButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xTimeStartButton.Click
xTimer.Stop()
End Sub
crazyhorse09
Junior Poster in Training
62 posts since Mar 2009
Reputation Points: 19
Solved Threads: 7
Ok, then try this in the button click:
If xTimer.Enabled = True Then
xTimer.Stop()
xTimer.Enabled = False
ElseIf Timer1.Enabled = False Then
xTimer.Enabled = True
xTimer.Start()
End If
P.S. You don't need to keep using all those "Me"s
crazyhorse09
Junior Poster in Training
62 posts since Mar 2009
Reputation Points: 19
Solved Threads: 7