I added to the top of the form
using mshtml;
IHTMLDocument2 doc = (IHTMLDocument2)webbrowser1.Document.DomDocument;
IHTMLControlRange imgRange = (IHTMLControlRange)((HTMLBody)doc.body).createControlRange();
The error is on:
(IHTMLControlRange)((HTMLBody)doc.body).createControlRange();
Error 3 One or more types required to compile a dynamic expression cannot be found. Are you missing a reference?