am calling the function of a form from another form. It executes but do not really show up. so any suggestions??
My code goes like
In Form FrmA
private void Print()
{
FrmMenu ObjMain = new FrmMenu();
ObjMain.Show();
}
public void CreateButtons(string Action)
{
btn.Text=Action;
}
And When the Form FrmMenu gets open then another function gets executed in constructor of FrmMenu
Public FrmMenu()
{
FrmA f2 = new FrmA();
f2.CreateButtons("NEW");
}
But nothing happens …!!! The function CreateButtons executes but do not show any changes
The text of button remain the same.
so please help me out.
EDITED
You must pass the instance of
FrmAinto the constructor ofFrmMenu.In
FrmA:In
FrmMenu: