Make a panel visible on Form1 by clicking a button on Form2
I have Form1 with a hidden panel. When I click a button on Form1, Form2 shows up. When I click on the show panel button on Form2, I want the panel on Form1 to immediately be visible. How would I do that?
VulpesPosted Oct 26, 2013, 9:49 AM
private void btnShowPanel_Click(object sender, EventArgs e)
{
Form1 f1 = (Form1)Application.OpenForms["Form1"];
Panel p = (Panel)f1.Controls["panel1"];
p.Visible = true;
}
John McFlurfinPosted Oct 26, 2013, 12:21 PM
Kiran Kumar TalikotiPosted Oct 26, 2013, 3:07 AM
If form1 is already hidden then you can make form1 visible when you click on button in form2;
button_click() //form2 button event
{
form1.visible=true;
}
Hope this helps you
FroglegPosted Oct 26, 2013, 12:47 AM