if and else for visible form [closed]
i have this code but return error
private void formshow_Click(object sender, EventArgs e)
{
if (form1.Visible)
{
MessageBox.Show("This form is visible");
}
else
{
Form2 f = new Form2();
f.Show();
}
}
help me please
Is form1
the type of the current instance? If so, change if (form1.Visible)
to if (this.Visible)
or simply if (Visible)
.
精彩评论