I’m making a snake game in C# and I have a pause and play button. Problem is: these buttons are in the exact same position, so I can’t click start after I have clicked pause (because it’s still active)
private void picBreak_Click(object sender, EventArgs e)
{
timer1.Stop();
picBreak.Visible = false;
picStart.Visible = true;
}
private void picStart_Click(object sender, EventArgs e)
{
timer1.Start();
picBreak.Visible = true;
picStart.Visible = false;
picStart.Focus = true;
}
The .Focus does not work and gives an error :/
ERROR = Error 1 Cannot assign to ‘Focus’ because it is a ‘method group’ C:\Users\Mave\Desktop\SnakeGame\Form1.cs 271 7 SnakeGame
Control.Focus is a method, not a property. This should be: