Getting TopMost MDIChild
-
Hi, I have a MDI application and I want to get the child form which is currently in focus/on top/being used. I've tried using logic like this to loop through all the MDIChildren:
array^ children = this->MdiChildren; for each (System::Windows::Forms::Form^ form in children){ if(form->TopMost){ System::Windows::Forms::MessageBox::Show(form->Text->ToString()); } }
but it doesn't work. -
Hi, I have a MDI application and I want to get the child form which is currently in focus/on top/being used. I've tried using logic like this to loop through all the MDIChildren:
array^ children = this->MdiChildren; for each (System::Windows::Forms::Form^ form in children){ if(form->TopMost){ System::Windows::Forms::MessageBox::Show(form->Text->ToString()); } }
but it doesn't work.I guess you should access the form's Active proprety
.: I love it when a plan comes together :. http://www.zonderpunt.nl
-
Hi, I have a MDI application and I want to get the child form which is currently in focus/on top/being used. I've tried using logic like this to loop through all the MDIChildren:
array^ children = this->MdiChildren; for each (System::Windows::Forms::Form^ form in children){ if(form->TopMost){ System::Windows::Forms::MessageBox::Show(form->Text->ToString()); } }
but it doesn't work.What you're looking for is the ActiveMdiChild[^] property of your MDI parent form.
Luis Alonso Ramos Intelectix Chihuahua, Mexico My Blog!