I'm trying to open a Panel that is in the main form (form1) from a button that is inside a UserControl , but the code runs but does not enable the panel of the main form Can you help me?
//UserControl code
private void BtnChangeStatusOrder_Click(object sender, EventArgs e)
{
Button seta = (Button)sender;
var form = new Form1();
form.EnabledPanel1(seta.Tag.ToString());
}
//main form code
public void EnabledPanel(string order)
{
panel1.Visible = true;
}