转载自http://www.itwriting.com/phorum/read.php?3,3531,3975,quote=1
1) setting aXWebBrowser.Silent = true at anappropriate time. The downside of this approach is that some of the pop-ups are useful, such as authentication prompts etc.
2) implementing IOleDocumentSite, IOleClientSite and IDocHostShowUI interfaces and using IDocHostShowUI:
howMessage for the purpose of intercepting the message box. I have attempted this but am yet to see the ShowMessage function invoked...
After doing some searching on the web, some of the possible solutions that I've seen included:
1) setting aXWebBrowser.Silent = true at anappropriate time. The downside of this approach is that some of the pop-ups are useful, such as authentication prompts etc.
2) implementing IOleDocumentSite, IOleClientSite and IDocHostShowUI interfaces and using IDocHostShowUI:
![confused smiley confused smiley](http://www.itwriting.com/phorum/mods/smileys/images/smilie11.gif)
3) implementing IOleCommandTarget and the QueryStatus and Exec methods, and then watching out for the Exec invocation with OLECMDID_SHOWSCRIPTERROR. From what I understand this behaviour doesn't work if Disable Script Debugging check box is cleared in Internet Explorer settings.