-1
I have an application that when it loads the main form (parent), it automatically creates two children Forms and show maximized, I use the following code in the Parent form to create the two Forms:
for (int i = 0; i < 2; i++)
{
frmSinotico sin = new frmSinotico(Par1, i+Par2);
sin.MdiParent = this;
sin.Show();
}
But I have to put in the Main form (parent) a timer that changes the display of these two Formularies. I used Formcollecion on the timer to load the open Formularies and to see if they exist.
FormCollection formAbertos = Application.OpenForms;
foreach (Form frms in formAbertos)
{
string nome = frms.Text ;
var formAb = Application.OpenForms[nome];
}
Application.OpenForms[formAb ].Focus();
However it gives error when I try to show the Focus in the name of the return form.
There’s some other way to do it?