'No text shown in label windows forms
Im making a hangman game with 2 player the second player types his name in a textbox and clicks ready up to enter game Here is the code
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = Methods.displayName_playertwo;
if (!checkBox1.Checked && !checkBox2.Checked && textBox1.Text != "\0")
button1.Enabled = false;
else
{
button1.Enabled = true;
}
if (checkBox1.Checked)
{
Form4 f = new Form4();
this.Hide();
f.Show();
}
if (checkBox2.Checked)
{
Form11 f = new Form11();
this.Hide();
f.Show();
}
}
https://i.stack.imgur.com/ZM98M.jpg Then i want to show it in a label
label14.Text = "Score of " + Methods.displayName_playertwo + ": " + User.score_Player2.ToString();
But its only showing score of:0 Its not showing the player 2 name
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
