Click here to Skip to main content
16,008,469 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have a parent form (IsMdicontainer=true) within a statusStrip , and a child with a button I wanna to change text of that statusStrip.text(in the parent form ) when the user clicks the button in the child form .
How can I do that guys? please...
Love u guys!
Posted

Re yogeshptl's answer: Using static because you don't understand how to implement events is not a good solution.
 
Share this answer
 
v2
you can easily solve this problem.
you create a public method in mdiparent form that changes statustrip text
like that
void ChangeText(String s)
{
//code for change text.
}

create a static object of mdiparent
eg.
public static MDIParent1 objMDIParent1;

initialise it on form load event
objMDIParent1=this;

and
call ChangeText method on child form
eg


MDIParent1 .objMDIParent1.ChangeText ("Some Tex");
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900