How to disable images in web browser management

in vb.net 2003, how to disable image loading in web browser control mode

+3
source share
1 answer

The way I did this in the past uses Regex to replace image tags with empty quotation marks. Try the following attempt, insert it into your DocumentLoaded event, or for example:

origHTML = webBrowser.DocumentText
Dim newHTML as String

Dim regex as String = "<img.*/>"

newHTML = Regex.Replace(origHTML, regex, "", RegexOptions.Multiline)
webBrowser.DocumentText = newHTML

This should solve your problem.

Regards

+2
source

Source: https://habr.com/ru/post/1707465/


All Articles