Hello
I am trying to grab the current document from the web browser control and converts it to the strong typed mshtml.HTMLDocument class with this function:
But I get the following error:Code:Private Function GetCurrentWebDoc() As mshtml.HTMLDocument Try Return DirectCast(wb.Document, mshtml.HTMLDocument) Catch ex As Exception Return Nothing End Try End Function
coming from the " wb.document ". Did I forget to add a reference ? other than the mshtml that is ?Runtime errors might occur when converting 'System.Windows.Forms.HtmlDocument' to 'mshtml.HTMLDocument'.




Reply With Quote