hi
i want to select an open window to be in front and close,maximize,minimize by C# code something like switch application in window recognition
(the only code i have found to close or maximize is by choosing the process, i don't want that )
Select an open window in c#
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Jignesh TrivediRank #16 · 50.3K reputationPosted Apr 29, 2013, 7:32 PM EDT
hi,
you can select your existing form from Application.OpenFormscollection by from name.
Form2 newform = (Form2)Application.OpenForms["Form2"];
and you can perform option on same.
newform.Close();
hope this will help you.