In C#, using Visual Studio 2019, I have run into a bizarre problem that makes literally no sense. I've been working on a program based on the Who Wants to be a Millionaire game show. For some reason, changing one PictureBox to visible, apparently is making 4 other PictureBoxes and 4 labels not want to become visible. Here's what I mean.
The following code....
private void pbATA_Click(object sender, EventArgs e)
{
if (LifeLineStat[3] == 0 && GameOver == 0 && SelectedAnswer == 0 && LifelineActive == 0)
{
LifelineActive = 1;
LifeLineStat[3] = 1;
pbATA.Visible = false;
pbATAUsed.Visible = true;
timRaiseLights.Enabled = true;
Music[1].Stop();
Music[3] = new System.Media.SoundPlayer(@"Audio\ATA1.wav");
Music[3].Play();
timATA1.Enabled = true;
}
}
But this code....
private void pbATA_Click(object sender, EventArgs e)
{
if (LifeLineStat[3] == 0 && GameOver == 0 && SelectedAnswer == 0 && LifelineActive == 0)
{
LifelineActive = 1;
LifeLineStat[3] = 1;
pbATA.Visible = false;
//pbATAUsed.Visible = true;
timRaiseLights.Enabled = true;
Music[1].Stop();
Music[3] = new System.Media.SoundPlayer(@"Audio\ATA1.wav");
Music[3].Play();
timATA1.Enabled = true;
}
}
.... results in this:
Why would changing the state of JUST pbATAUsed.Visible make the Ask The Audience bars and percentages not show up?!