C# stop webbrowser control from loading images, flash, script, etc

How can i stop the webbrowser from loading/displaying images, flash, script etc?

I found this article that deals with it, but i dont know how to implement that "STDMETHODIMP CAtlBrCon::Invoke" function

This is the link:article

Can anyone point me into the right direction?


The process is like this:

The control calls the webbrowser's IOleControl.OnAmbientPropertyChange implementation in the SynchDOCDOWNLOADCTLFLAG function in http://csexwb2.googlecode.com/svn/trunk/cEXWB.cs to notify the webbrowser control about a change in ambient properties inside the ActiveX host.

The the webbrowser control then calls its host's IDispatch.Invoke implementation to query for the updated download control flag.

The host's IDispatch.Invoke implementation for the DISPID_AMBIENT_DLCONTROL dispid looks like this

[DispId(HTMLDispIDs.DISPID_AMBIENT_DLCONTROL)] public int Idispatch_AmbiantDlControl_Invoke_Handler() { return (int)m_DLCtlFlags; }

Check Controlling Download and Execution to see the list of flags you can use to change the behavior of the browser.

链接地址: http://www.djcxy.com/p/62872.html

上一篇: 如何从rake任务启动IRB控制台?

下一篇: C#停止加载图像,flash,脚本等webbrowser控件