.NET mod window over VB6

We have a VB6 application showing a .NET WPF modal window (on the main VB6 thread).

It correctly blocks interaction with VB6 UI because the thread is blocking in window.ShowDialog ().

We also have a timer in VB6. Since the timer loops on the main thread ( Does the VB6 Timer control create a separate thread? ) I would expect the timer to also block until the modal is closed. This is not the case. The VB6 timer keeps ticking, executing the VB6 code on the tick and updating the locked VB6 UI. Also, as soon as the timer loops for the first time, the WPF window LOSES its modality - which means I can go back to the VB6 screen and the WPF window will move behind the VB6 window.

Any idea what's up with this? Is WPF handling WNDPROC messages and then suddenly allowing VB6 code to execute and losing IsThreadModal for some reason?

Thank.

+3


source to share





All Articles