Devv Active Member Licensed User Longtime User Feb 20, 2015 #1 How could i change a timer interval ? is initializing a timer more than once safe ?
NJDude Expert Licensed User Longtime User Feb 20, 2015 #2 Using INTERVAL, check the Timer's intellisense. Upvote 0
Devv Active Member Licensed User Longtime User Feb 20, 2015 #3 NJDude Could you please explain more ? sorry i'am new to basic language ... Upvote 0
Devv Active Member Licensed User Longtime User Feb 20, 2015 #5 i had already red it .. it does not talk about changing timer interval , it only say about initializing the timer for the first time Upvote 0
i had already red it .. it does not talk about changing timer interval , it only say about initializing the timer for the first time
NJDude Expert Licensed User Longtime User Feb 20, 2015 #6 Well, read it again, it says right there: Code: Interval As Long Gets or sets the interval between tick events, measured in milliseconds. Upvote 0
Well, read it again, it says right there: Code: Interval As Long Gets or sets the interval between tick events, measured in milliseconds.
Devv Active Member Licensed User Longtime User Feb 20, 2015 #7 NJDude said: Well, read it again, it says right there: Code: Interval As Long Gets or sets the interval between tick events, measured in milliseconds. Click to expand... so at the second time i dont have to use this Initialize (EventName As String, Interval As Long) i should only use timer1.interval = 2000 am i right ? Upvote 0
NJDude said: Well, read it again, it says right there: Code: Interval As Long Gets or sets the interval between tick events, measured in milliseconds. Click to expand... so at the second time i dont have to use this Initialize (EventName As String, Interval As Long) i should only use timer1.interval = 2000 am i right ?
Devv Active Member Licensed User Longtime User Feb 20, 2015 #9 Code: Sub Activity_Create(FirstTime As Boolean) test.Initialize("test",2000) test.Enabled = True End Sub Sub test_tick ToastMessageShow("test",False) test.Interval = 6000 End Sub ya this code is working perfectly , thanks for help dude , you are noobs hero Upvote 0
Code: Sub Activity_Create(FirstTime As Boolean) test.Initialize("test",2000) test.Enabled = True End Sub Sub test_tick ToastMessageShow("test",False) test.Interval = 6000 End Sub ya this code is working perfectly , thanks for help dude , you are noobs hero
RandomCoder Well-Known Member Licensed User Longtime User Feb 20, 2015 #11 Yes you're right, you don't need to initialise it again. I normally call a sub to stop the timer, set the new interval and then restart the timer to ensure that the first tick event is from time 0 to the interval time eg. Code: ..... ' your other code tmr_Reset(2500) ' reset timer to 2.5s interval .... Sub tmr_Reset(ms As Int) tmr.Enabled=False tmr.Interval=ms tmr.Enabled=True End Sub Upvote 0
Yes you're right, you don't need to initialise it again. I normally call a sub to stop the timer, set the new interval and then restart the timer to ensure that the first tick event is from time 0 to the interval time eg. Code: ..... ' your other code tmr_Reset(2500) ' reset timer to 2.5s interval .... Sub tmr_Reset(ms As Int) tmr.Enabled=False tmr.Interval=ms tmr.Enabled=True End Sub