spendergrass
asked on
How do I find MDI Active Child from toolbar on MDI Parent in VB.NET Winforms Application?
I am creating a VB.NET Winforms application in VS 2005. I have an MDI Parent form which includes a menu bar and toolbar. All of the other forms within the application are opened up as MDI Child forms. After entering data into the child forms, I would like to be able to click on the Save button on the parent form toolbar, but I can't quite figure out how to find out what the last active child form was. Any suggestions?
ASKER
That is exactly how I thought it should work; however, I can not see the Save method from Me.ActiveChild. I double-checked and it is Public. Any other ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That works - thank you so much for your help!
Sarah
Sarah
Active Child Form on a MDI form can be found by ActiveChild property of MDI form.
You can have a Save routine in your all child forms like
Public Sub Save()
'' Save Code here
End Sub
Then on the toolbar button click of MDI you can call is
Me.ActiveChild.Save()