views:

22

answers:

0

My VB.NET app supports several kinds of MDI child forms. Some kinds, but not others, are 'troublesome' -- they cause the focus mechanism to become weird. Once a 'troublesome' child form has been opened, NONE of the MDI child forms will become activated unless I click on either the title bar or the border. Clicking in the client area does not activate the child form -- its title bar remains gray, and it does not receive Activate or GotFocus events. Strangely, however, the clicked-on form actually DOES receive the focus, because its controls receive mouse and key events. Only the Z-Order and the highlighting do not change.

Once this problem develops, it persists even after the 'troublesome' form is closed, and it affects child forms which are opened afterward. However, if ALL of the child forms are closed, the problem clears up, and new child forms behave normally -- until the next 'troublesome' form appears.

I have no idea why one kind of child form is troublesome, and others are not.

Any suggestions would be greatly appreciated.