The TopMost style doesn't work with MDI child form. However, you may handle the Leave event of your top most MDI child, and set the focus back to it.
When you want to switch the Top Most MDI child, you may remove the handler and add it to another form. Here is a sample code: private void MDI_Leave(object sender, System.EventArgs e)
{
Form mdi = (Form)sender;
if(mdi != null)
mdi.Focus();
} //Set the event handle
TopForm.Leave += new EventHandler(this.MDI_Leave);
When you want to switch the Top Most MDI child, you may remove the handler and add it to another form. Here is a sample code: private void MDI_Leave(object sender, System.EventArgs e)
{
Form mdi = (Form)sender;
if(mdi != null)
mdi.Focus();
} //Set the event handle
TopForm.Leave += new EventHandler(this.MDI_Leave);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货