关于隐藏控件的问题
我想点击按钮就显示picture1 再次单击就隐藏 下面的实现不了 到底代码怎么写private bool bool_a_b = false;
private bool bool_a_b_c = false;
private void button1_Click(object sender, EventArgs e)
{
if (bool_a_b == false && bool_a_b_c == false)
{
pictureBox1.Visible = true;
}
else
if (bool_a_b == false && bool_a_b_c == true)
{
pictureBox1.Visible = false ;
}
else
if (bool_a_b == true && bool_a_b_c == true)
{
pictureBox1.Visible = false;
}
else
if (bool_a_b == true && bool_a_b_c == false)
{
pictureBox1.Visible = true;
}
}