Hi all,
I've searched for it and cant find the answer.
I have a win form application. In the main form, I have a save button.
Now I have a save in the file menu and when I click it I want it the following to do:
Determine the active form in the mainform.
Search on that form for the save button and perform the actions the save button click event does.
Kind regards guys.
I hope someone can help me
Main forme menu save
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Mayur DigheRank #1,078 · 1.8K reputationPosted Dec 19, 2012, 1:09 AM EST
you can do this....just try to follow the steps below..
1. if your "mainform" is MDIForm or normal Windows Form...then
by invoking Application.OpenForms() method you able to find the name of ACTIVE FORM.
2. Next you want to do some actions with control available on that form, then
you need to use any looping technique (like FOR, Do While...) you can list the Controls on that form with their names by calling Controls() method to enumerate controls.