1.In c# I want to show panel in form1 when i click a button in form 2. i create a method showpanel(){ panel1.show();} in form1 in this form1 i call showpanel() it is works fine. when i call with form2 it is not work.
In Form2:
private void panel1_MouseDoubleClick(object sender, MouseEventArgs e)
{
Form1 f1 = new Form1();
f1.showpanel();
}
In Form1:
public void showpanel()
{
panel1.Visible = true;
}
2.i also make panel public and call directly from form2 also
In Form2:
private void panel1_MouseDoubleClick(object sender, MouseEventArgs e)
{
Form1 f1 = new Form1();
f1.panel1.Show();
f1.panel1.Visible = true;
}
but it also not work.