I am confused what will happen, when I disable a timer. Will it finish the process and then disable or will it immediately disable without completing process?
for example
Private Sub MyTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyTimer.Tick
MyTimer.Enabled = False
getMessage()
MyTimer.Enabled = True
End Sub
I want to run getMessage from somewhere else, so I need to disable timer during that time to be asured not to override anything and also before timer disable it should complete that function code.
Read this MSDN article about the
Timer‘sEnabledproperty. It statesSo in answer to your question, it will stop the
Timerwhen you disable it.