开发者

WindowsFormsHost Mouse event problem

开发者 https://www.devze.com 2023-02-13 04:44 出处:网络
We have a WPF application that uses the Winform开发者_运维知识库s WebBrowser control inside a WindowsFormsHost.We are getting complaints from users because when they click on a control in the displaye

We have a WPF application that uses the Winform开发者_运维知识库s WebBrowser control inside a WindowsFormsHost. We are getting complaints from users because when they click on a control in the displayed webpage their mouseclick isn't registered if the main window isn't activated. They have to 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 the WindowsFormsHost itself, because I can reproduce it in a simple test application consisting of only a WPF window, a WindowsFormsHost and a WinForms Button control. Clicking the button when the main window is not activated doesn't work.

Does anyone know of a way to make this work?

0

精彩评论

暂无评论...
验证码 换一张
取 消