Prevent WebBrowser control from stealing focus?

后端 未结 2 1292
无人及你
无人及你 2020-12-05 05:54

Is there a way to stop the WebBrowser control from causing its parent form to bring itself to the front?

If you use the InvokeScript method to invoke a JavaScript fu

2条回答
  •  悲哀的现实
    2020-12-05 06:21

    Implement IProtectFocus::AllowFocusChange in an object

    Implement IServiceProvider on the same object that implements IOleClientSite, then respond to a IServiceProvider::QueryService for SID_SProtectFocus with an object that exposes IProtectFocus

    This is a new interface in IE7, so old versions are out of luck.

提交回复
热议问题