I need to change a menuStrip item text of the main window (mdi container) from a child window,
something like this:
File
-Login
to
File
-Logout
cmdimenustripwinforms
I need to change a menuStrip item text of the main window (mdi container) from a child window,
something like this:
File
-Login
to
File
-Logout
Best Answer
On the main window add these:
Obviously use the name that you set or was automatically set for the menu strip item for the login/logout menu item. then in the form constructor of the main form, set the Current.
Then from the other window/form you can call (to set the value):
But better than this is that you on your child window make an event,
And on the MainForm have the MainForm subscribe to that event with a reverse of the above...
And have the child raise the event when the user logs in, with
UserLoggedIn()
.