Hello! Here's the following code that I have problem with. The problem is that everytime I put in Timer.start(); and Timer.stop(); the code doesn't work properly. When I hold and release shift the text is stuck at "Shift is held" and the Timer isn't starting at all. Is there any way to fix that issue?
C#:
if (CheckBox.Checked == true)
{
if ((Control.ModifierKeys & Keys.Shift) == Keys.Shift)
{
label1.Text = "Shift is held";
Timer.Start();
}
else
{
label1.Text = "Shift is released";
Timer.Stop();
}
}