We have a WPF application that uses the Winforms WebBrowser control inside WindowsFormsHost. We receive complaints from users because when they click on a control on the displayed web page, their mouseclick does not register if the main window is not activated. They must click once to activate the window, then click again to use the page. For people doing data entry, this is very annoying.
I believe the problem is with WindowsFormsHost itself, because I can reproduce it in a simple test application consisting only of a WPF window, a WindowsFormsHost control and WinForms. Pressing the button when the main window is not activated does not work.
Does anyone know how to do this?
source
share