I have a countdown timer in my application that is to be controlled via keyboard. Currently, it will start (or reset to the starting value of 20minutes) when the user presses "B", and stop when the user presses "A". Trying to figure out how to restart the timer from the stopped time. i.e. if the user presses "A" at timer 15 mins 32 seconds, pressing a again would resume the countdown. Here is the code I have currently (at least as it pertains to the countdown).
PrivateSub Me_KeyDown(ByVal sender AsObject, ByVal e As System.Windows.Forms.KeyEventArgs) HandlesMe.KeyDown If e.KeyCode = Keys.B Then Timer1.Enabled = True CountDownStart = Microsoft.VisualBasic.DateAndTime.Timer ElseIf e.KeyCode = Keys.A Then Timer1.Enabled = False End If End Sub
Would someone be kind enough to point me in the right direction please?