Use the same button to perform start and stop





3.00/5 (1 vote)
This trick is really meant for novice programmers...
Declare this in the general section inside the class:
dim flag as integer = 1and then copy and paste the following code inside the button's click event:
If (flag = 1) Then 'write down the statements to start... Else 'write down the statements to stop... End If flag *= -1