Here is the code that I am using
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
IHTMLDocument2 doc2 = webBrowser1.Document.DomDocument as IHTMLDocument2;
StringBuilder html = new StringBuilder(doc2.body.outerHTML);
String substitution = "<span style='background-color: rgb(255, 255, 0);'> sensor </span>";
html.Replace("sensor", substitution);
doc2.body.innerHTML = html.ToString();
}
It works, but the I cannot use the form nor the web browser
I have tried to added
webBrowser1.Document.Write(html.ToString()); //after doc2 at the end
But the webpage displayed is not formmatted correctly
I would be grateful, to get this fixed