Thread: eVB and waiting
View Single Post
Old 10-07-03, 10:31 PM   #10 (permalink)
Tom61
Aximsite All Star
 
Join Date: Dec 2002
Posts: 744
Thanked 0 Times in 0 Posts
The problem is that you're treating the timer element as a subroutine, and you're confusing it.

Demo code time:
Open a new project make 2 command buttons and 1 timer element
Double click on the command1 button and type timer1.interval=500

Quote:
Private Sub Command1_Click()
Timer1.Interval = 500
End Sub
go back to form, double click on the timer element and type command1.Left=command1.Left+5

Quote:
Private Sub Timer1_Timer()
Command1.Left = Command1.Left + 5
End Sub
go back to form, double click on the command2 button and type timer1.interval=0

Quote:
Private Sub Command2_Click()
Timer1.Interval = 0
End Sub
See? Timer element not subroutine. Timer exists outside of any other code.

Clicking on Command1 starts Command1 moving, Command2 stops Command1 moving.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tom61 is offline   Reply With Quote