Disable image loading from webbrowser control before the documentcompleted event

10,107

Solution 1

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

Solution 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.

Share:
10,107
Jepe d Hepe
Author by

Jepe d Hepe

Developer / Scrum Master Open-Minded

Updated on June 16, 2022

Comments

  • Jepe d Hepe
    Jepe d Hepe almost 2 years

    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?

  • John Saunders
    John Saunders over 14 years
    Please provide an example of doing this.
  • Valamas
    Valamas over 6 years
    unconfirmed, I was seeing images still. however I think they were cached. "Control Panel / Internet Options", delete I did.