The user needs to fill in a form at the beginning of the game and I was trying to use their selected gender to generate which icon they will have. However I have tried many solutions to this problem and the picturebox either remains blank when I run the program, or only shows one of the pictures no matter which gender I pick. Does anyone know how I can fix this?
private void Form9_Load(object sender, EventArgs e)
{
if (Form10.gender == "male")
{
pictureBox1.Image = Properties.Resources.playerboy;
}
else if (Form10.gender == "female")
{
pictureBox1.Image = Properties.Resources.playergirl;
}
else
{
pictureBox1.Image = Properties.Resources.playerother;
}
}