In my application the user can open multiple forms.
Some forms are MDI, some not.
How can I detect, in a arbitrary (MDI or not) form if it's a active form or not?
from MSDN (Form.ActiveForm property explanation):
You can use this method to obtain a reference to the currently active form to perform actions on the form or its controls. If your application is a multiple-document interface (MDI) application, use the
ActiveMdiChild
property to obtain the currently active MDI child form.
I have 2 possibilities, one for MDI, other for non-MDI, but what if I have both forms open, how I detect which of them is really active?