-
help with timer
Hallo
Just need the variable to get the action sleep for defined time written in 'textbox3.text'
Dim x As Integer = 1
Dim i As Integer = 0
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
For Me.x = 1 To 10
TextBox2.Text = TextBox1.Text & Me.i
If Me.x > 0 Then
'do something
' HERE SHOULD BE THE VARIABLE TO GET THE WHOLE ACTION SLEEP FOR TIME (textbox3.text)
End If
Next
-
Re: help with timer
I have no idea what you mean by "get the action sleep"
-
Re: help with timer
it should pause for 6sec every loop, but not freeze, just do nothing 6 sec :D
-
Re: help with timer
What's the difference between "do nothing" and "freeze"? If it's not frozen then it is doing something, right?
-
Re: help with timer
<-- comment deleted by mod -->
and specially for u, freeze ( app not responding, flattering etc.), 'do nothing' (waiting for some time to do something)
One guy post on other forum, '' u want to freeze ur app, is that what u wanna do ?''
I dont wanna pause the program
-
Re: help with timer
looks like you should try an anger managment forum
-
Re: help with timer
When you put your app to sleep it does nothing which means it is frozen.
You would use a timer to make something happen at given intervals, sleep to halt execution for a given interval
You can but should not use a busy loop to cause your code to not go past the loop for a given time but again this will effectively freeze your app unless you have a doevents in there and that will allow other stuff to happen so that does not sound like what you want.
In the future you should try to give the best description possible of what you are trying to do and do not insult other members of the forum.
-
Re: help with timer
When you put your app to sleep it does nothing which means it is frozen.
You would use a timer to make something happen at given intervals, sleep to halt execution for a given interval
You can but should not use a busy loop to cause your code to not go past the loop for a given time but again this will effectively freeze your app unless you have a doevents in there and that will allow other stuff to happen so that does not sound like what you want.
In the future you should try to give the best description possible of what you are trying to do and do not insult other members of the forum.
-
Re: help with timer
akmaggot666, please refrain from calling people names. Also, please do not report posts unecessarily with foul language.
This is a peaceful forum. We are all here to help.
I am closing this thread now.
Thanks DM for cleaning up this thread :thumb: