C# 在documentcompleted事件之前禁用从webbrowser控件加载图像

C# 在documentcompleted事件之前禁用从webbrowser控件加载图像,c#,.net,webbrowser-control,C#,.net,Webbrowser Control,我想防止页面中的图像加载到WebBrowser控件中。我希望它发生在DocumentCompleted事件发生之前。有办法吗?您可以设置或使用可编程代理。尝试以下代码: RegistryKey RegKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Internet Explorer\Main", true); RegKey.SetValue("Display Inline Images", "no"); 它会更改注册表项。请

我想防止页面中的图像加载到
WebBrowser
控件中。我希望它发生在
DocumentCompleted
事件发生之前。有办法吗?

您可以设置或使用可编程代理。

尝试以下代码:

RegistryKey RegKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Internet Explorer\Main", true);
RegKey.SetValue("Display Inline Images", "no");

它会更改注册表项。

请提供一个这样做的示例。未确认,我仍然看到图像。但是我认为它们被缓存了。“控制面板/互联网选项”,删除我所做的。