ToolStrip MenuItem and Button association

VB_Guy

New member
Joined
Sep 24, 2007
Messages
4
Programming Experience
10+
I have an MDI form as my main menu named "MainMenu". On that form I have a "Save" menu item under the File menu and a Save icon on the toolstrip below the text menus.

The "Save" menu item and button is enabled = false by default. When I open a child window named "NewBirthdoc" in the form load event, I set the "Save" menu item and button enabled = true.

The NewBirthdoc has a regular "Save" button on it that works fine (called btnSave). Now what I would like to do is make the "Save" menu item and button on the MainMenu toolstrip to call the same code that the NewBirthdoc "Save" button calls. How do I make that association?

I hope I explained clearly enough.

Using VB.NET 2005.
 
You could on mdi child put a toolstrip with Save button and merge it to the main strip when it goes active.
 
VB.NET:
'1st check if the NewBirthdoc form is active and then just do this:
My.forms.NewBirthdoc.btnSave.PerformClick()
 
Back
Top