0

New to VB.NET :(

I have a MDI form that has a menu item that can change the environment the application is running in (e.g. Prod, Test, Dev, etc.). The environment name and folder are written to the statusbar on the MDI from. There are several other forms in the application, each with its own statusbar containing the same information that is on the MDI form. If a user changes the environment, the fields on the MDI's statusbar need to change to reflect this, i.e. I need to update the statusbar variables on the other active forms as soon as the MDI's variables change.

How do I do this, please?

2
Contributors
1
Reply
20
Views
2 Years
Discussion Span
Last Post by niranga
0

In the event handler which handles the Click event for the Menu Item, you can set the status bar information.

Protected Sub ChangeEnv_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChangeEnv.Click   
   'Set the Status Bar Information by iterating child forms here
End Sub

I think you can use the Form.MdiChildren Property to get children forms from the MDI container, but I never used it.
Reference -
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.mdichildren%28v=vs.110%29.aspx

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.