You're creating a modeless WPF popup window, which runs on the message loop of an unmanaged VB6 app. There're some rules about this: Sharing Message Loops Between Win32 and WPF. I'm not sure though that would help in your specific case, even if you managed to implement the message loop requirements on the VB6 side.
Ideally, you should create an unmanaged Win32 popup window on the VB6 side, and use HwndSource
to host your WPF content inside that window. Check Walkthrough: Hosting WPF Content in Win32.
Alternatively, you could try exposing a WPF Composite Control as an ActiveX control for VB6. First, you'd need to make sure it works inside a VB.NET WinForms UserControl
, check Walkthrough: Hosting a WPF Composite Control in Windows Forms. Then, expose the WinForms UserControl
as ActiveX control to VB6 with Microsoft InteropForms Toolkit. I'd probably go that route.