Is it possible to change CSS in VB.NET WebBrowser?

0

Hello, all good guys? my next question ...

I want to disable all background-image then ...

I wanted to get the html from the entire page and put nothing on the "background-image" tag leave it always empty.

In the images I got .. I studied and found

For Each img As HtmlElement In WebBrowser1.Document.Images
            img.SetAttribute("src", "")
            img.SetAttribute("style", "")
        Next

More about css, I have not found a solution yet.

    
asked by anonymous 26.08.2015 / 07:59

1 answer

2

To capture all page elements:

Dim todosElementos As HtmlElementCollection = WebBrowser1.Document.All

And change the style:

For Each elemento As HtmlElement In todosElementos
   elemento.Style = "background-image: none"
Next
    
26.08.2015 / 12:03