tags:

views:

17

answers:

1

I have a WPF DLL containing a few forms I'm trying to call from a VB6 app. I've got most of the interop figured out. I can open the forms fine and for the most part they work fine. They operate on their own and don't need to communicate with the VB6 app. The problem I'm running into is that when the WPF forms open the first time I hit tab, focus immediately jumos back to my VB6 app. It seems that the VB6 app still thinks it has focus and tries to do something with the tab key. I've been hacking around for hours and nothing seems to work. Has anyone run into this and how can I get around it? Opening my WPF DLL from a WinForms app works fine.

+1  A: 

Get the hWnd of the WPF form and set focus to it.

Use GetHandleFromPartialCaption and SetForegroundWindow

Cidtek