在documentcompleted事件之前禁止从webbrowser控件加载图像

Jep*_*epe 6 .net c# webbrowser-control

我想防止页面中的图像被加载到WebBrowser控件中.我希望它在DocumentCompleted事件发生之前发生.有没有办法做到这一点?

jaP*_*wel 8

试试这段代码:

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

它更改了注册表项.