You want to do this:
private void cmdTab1_Click(object sender, EventArgs e)
{
NumberOfCovers numcov = new NumberOfCovers(this.ButtonTablesPanel);
DialogResult result = numcov.ShowDialog();
if (result == DialogResult.OK)
{
TableOrderPanel.Visible = true;
FlowLayoutPanelUserFunctions.Visible = false;
SendOrderPanel.Visible = true;
}
}
In form2, you may need to do this:
private void cmdOk_Click(object sender, EventArgs e)
{
cP.Visible = false;
this.DialogResult = DialogResult.OK;
this.Close();
}
private void cmdCancel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}