Steve
Steve

Reputation: 5073

Clicking MDI children form doesn't bring it to front

This is a winform question in .net.

In a MDI form, if I open several children forms, for some forms, if they are not activated (if you overlap them with the activate one, they are not up to front. Only the activate form is up to front.), clicking them don't bring them to front. This is even true if I click controls on them, such as a textbox. The textbox gets focus and you can intput things, but that form is still not activated.

Interestingly enough, this is not the case for all the children forms I created. Some forms behave correctly but others don't. Did I do something wrong?

I think the correct behavior is that, everytime I click a form, bring it up to front.

Thank you for any suggestion.

Upvotes: 1

Views: 1061

Answers (2)

miguel castillo
miguel castillo

Reputation: 1

try this childForm.ShowDialog(Me)

Upvotes: 0

Wirah
Wirah

Reputation: 20

childForm.MdiParent = Me

childForm.WindowState = FormWindowState.Maximized

childForm.Show()

childForm.Focus()

Upvotes: 1

Related Questions