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
form1the type of the current instance? If so, changeif (form1.Visible)toif (this.Visible)or simplyif (Visible).