The testprogram was modified by adding some more controls to the usercontrol, a TabControl containing two TextBox controls. Open the dialog form and click any of the dialog Dialog buttons. The Dialog with its usercontrol is displayed. Give input focus to one of theTextBox controls inside the TabControl. Then click the main window (for modeless dialogs) or give focus to another application (for both modal/less dialogs). The testapplication will then be irresponsive, cpu is running at 100% and the task manager reports status Not Responding for the test app. Other applications can be used, seems like the cpu is busy doing 'nothing'.
It seems like there is a problem with messagerouting when combining a tabcontrol in an usercontrol in a mixed mode environment. In win32, dialog has their own messagepump. Is there a conflict with the hosting dialog and the TabCtrl or the .NET runtime? Is there a fix or workaround for this problem?