Jepe d Hepe
Jepe d Hepe

Reputation: 909

Disable image loading from webbrowser control before the documentcompleted event

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?

Upvotes: 6

Views: 10216

Answers (2)

jaPawel
jaPawel

Reputation: 2675

Try this code:

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

It changes registry key.

Upvotes: 8

Sheng Jiang 蒋晟
Sheng Jiang 蒋晟

Reputation: 15281

You can set the DISPID_AMBIENT_DLCONTROL ambient property or change the browser's process's WinInet session to use a programmable proxy.

Upvotes: 1

Related Questions