I want to prevent images in a page from being loaded in the WebBrowser
control. I want it to happen before the DocumentCompleted
event occurs. Is there a way to do this?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can set the DISPID_AMBIENT_DLCONTROL ambient property or change the browser's process's WinInet session to use a programmable proxy.
回答2:
Try this code:
RegistryKey RegKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Internet Explorer\Main", true);
RegKey.SetValue("Display Inline Images", "no");
It changes registry key.