Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 400
Jepe d Hepe Avatar asked Jan 12 '10 11:01

Jepe d Hepe


2 Answers

Try this code:

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

It changes registry key.

like image 181
jaPawel Avatar answered Sep 27 '22 22:09

jaPawel


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

like image 41
Sheng Jiang 蒋晟 Avatar answered Sep 27 '22 23:09

Sheng Jiang 蒋晟