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:

Code:
Private Function GetCurrentWebDoc() As mshtml.HTMLDocument
        Try
            Return DirectCast(wb.Document, mshtml.HTMLDocument)
        Catch ex As Exception
            Return Nothing
        End Try
    End Function
But I get the following error:

Runtime errors might occur when converting 'System.Windows.Forms.HtmlDocument' to 'mshtml.HTMLDocument'.
coming from the " wb.document ". Did I forget to add a reference ? other than the mshtml that is ?