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?
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Oct 26, 2013, 5:49 AM EDT
private void btnShowPanel_Click(object sender, EventArgs e)
{
Form1 f1 = (Form1)Application.OpenForms["Form1"];
Panel p = (Panel)f1.Controls["panel1"];
p.Visible = true;
}
FroglegRank #1,020 · 1.9K reputationPosted Oct 25, 2013, 8:47 PM EDT
Kiran Kumar TalikotiRank #814 · 2.8K reputationPosted Oct 25, 2013, 11:07 PM EDT
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
John McFlurfin14 reputationPosted Oct 26, 2013, 8:21 AM EDT