From: Jeff Caton on
Hello!
How can I disable loading images in the webbrowser control?
From: Onur Güzel on
On Jun 10, 10:06 am, Jeff Caton <j.ca...(a)gmailnotspam.com> wrote:
> Hello!
> How can I disable loading images in the webbrowser control?

There's no built-in method or property do disable images from being
loaded in webbrowser control which relies on IE. And modifying "src"
attribute of "img" tag may not be enough as the images may come from
dynamically from different servers. So, another solution can be
tweaking registry to disable images from being loaded, note that this
setting also effects regular Internet Explorer. So, you may re-set it
to False as follows:

' Set Display Inline Images value to false
Dim regkey As Microsoft.Win32.RegistryKey = _
My.Computer.Registry.CurrentUser
regkey.OpenSubKey("Software\Microsoft\Internet Explorer\Main", _
True).SetValue("Display Inline Images", "no")

Keep in mind that writing to registry requires administrative rights.

HTH,

Onur Güzel
From: redbull on


"Onur G�zel" <kimiraikkonen85(a)gmail.com> ha scritto nel messaggio
news:2c54ce94-24a0-40e6-acce-ade268dce7a5(a)y4g2000yqy.googlegroups.com...
> On Jun 10, 10:06 am, Jeff Caton <j.ca...(a)gmailnotspam.com> wrote:
>> Hello!
>> How can I disable loading images in the webbrowser control?
>

what about a 2 pass procedure?
u load the html page using webclient, then you can remove all the unwanted
tags , then you load the code into a webbrowser control :)


From: Onur Güzel on
On Jun 10, 6:11 pm, "redbull" <redb...(a)libero.it> wrote:
> "Onur Güzel" <kimiraikkone...(a)gmail.com> ha scritto nel messaggionews:2c54ce94-24a0-40e6-acce-ade268dce7a5(a)y4g2000yqy.googlegroups.com...
>
> > On Jun 10, 10:06 am, Jeff Caton <j.ca...(a)gmailnotspam.com> wrote:
> >> Hello!
> >> How can I disable loading images in the webbrowser control?
>
> what about a 2 pass procedure?
> u load the html page using webclient, then you can remove all the unwanted
> tags , then you load the code into a webbrowser control :)

That will only work with pure-HTML. Think of a page that should
retrieve images or any visual content dynamically, that is, while page
is open, using some script. At that time, newer content than the
loaded content (content, whose img tags are removed) will bring
images. Worse, there may be other elements in document such as links
which have the non-absolute targets (hrefs), like "page.html" rather
than "http://somedomain.com/page.html". When you download a file onto
a local disk (let's say c:\), browser will try locating link's target
at: c:\page.html" which is not available.

So, disabling images using registry before launching application is
wiser to approach. Restore it on app shutdown, as well.

Onur Güzel
From: Jeff Caton on
Thanks, Onur!