I made a simple tic,tac,toe game. I have two forms, Form1 and frmStats. on my frmStats I have a Label lblDraw.
I want it so when the players get in a draw, the label will increment by one. How do I access that from Form1‘s code?
my Form1 code:
if (winner != 0)
this.Text = String.Format("Player {0} Wins!", winner);
else if (winner == 0 && turnCounter == 9)
this.Text = "Draw!";
//this is where i want/think the code should be to change the label
else
...
First of all set the Label
lblDrawasIn
frmStatsformForm1
or else simply set the Label
lblDrawmodifier as public, which is not recommended.