samedi 13 mars 2021

If statement about a button is clicked or not [closed]

I want the computer to check if a button is clicked then do the commands placed below. But apparently buttonD_Click doesn't work. How do you do this? (yes, I'm an absolute beginner)

if (buttonD_Click)    
{
    pictureBox1.Visible = true;
    correct++;
    buttonA.Enabled = false;
    buttonB.Enabled = false;
    buttonC.Enabled = false;
    buttonD.Enabled = false;
}
else
{
    pictureBox2.Visible = !false;
    incorrect++;
    buttonA.Enabled = false;
    buttonB.Enabled = false;
    buttonC.Enabled = false;
    buttonD.Enabled = false;
}

Aucun commentaire:

Enregistrer un commentaire