Hello.
I've been trying to code a simple thing in many ways, but they all failed. I want to make a Function that will be used as a delay ( No, I don't want System.Threading.Thread.Sleep() ). Take a look at the code:
I want the timer to start at Timer.Start(), delay up to certain seconds, and stop at Timer.Stop(). So, when it's called, I want a delay of the specified seconds.
Help.
I've been trying to code a simple thing in many ways, but they all failed. I want to make a Function that will be used as a delay ( No, I don't want System.Threading.Thread.Sleep() ). Take a look at the code:
VB.NET:
Public Function Time() Timer.Enabled = True
Timer.Start()
MsgBox("Timer has started")
Timer.Stop()
MsgBox("Timer has stopped")
Timer.Enabled = False
End Function
I want the timer to start at Timer.Start(), delay up to certain seconds, and stop at Timer.Stop(). So, when it's called, I want a delay of the specified seconds.
VB.NET:
Public Function NameOfTheFunc() CurrentStatus.Text = "Working..."
For Me.CurrentNumber = 1 To CustomNumber.Text
----Do things----
Time() ----Delay 10 secs----
----Do more things----
Next NameOfTheFunc
End Function
Help.