I have come across a situation for which I need some help:
if I do this :
using System.Linq
......
private void GetOpenedFormTypes()
{
Form[] openForms = Application.OpenForms.Cast<Form>().ToArray();
foreach (Form f in openForms)
{
MessageBox.Show(f.GetType().ToString());
}
}
I would get a messagebox with the text containing NameSpace.ChildForm for each opened form
When I set form's Text to "" and control box to false - I can get a nice flat bordered window, but this time MessageBox shows only other forms, when I recall GetOpenedFormTypes(), The "flatted out" form with the control box set to false, is being ignored. Is it not considered by Application.OpenForms anymore? Am I doing something wrong here?
Even after enabling the control box and the title text again (using simple switching code for it on a button), and recalling the GetOpenedFormTypes(), that form gets ignored till I close it down and reopen.