I’m trying to take this code http://www.codeproject.com/internet/htmlimagecapture.asp?msg=783507 and convert it to C#.

I can’t seem cast from IHTMLElement down to IHTMLElementRender.  Trying through late binding also fails.

IHTMLDocument2 doc = (IHTMLDocument2)Browser.Document;
IHTMLElement body = (IHTMLElement)doc.body;

// Render returns as null
IHTMLElementRender render = (IHTMLElementRender)body;

// Render is also null
IHTMLElementRender render = body.getType().GetInterface(“IHTMLElementRender”);

Does anyone have working C# calling DrawToDC?