AxSHDocVw.AxWebBrowser


   Public WithEvents AxWebBrowser1 As AxSHDocVw.AxWebBrowser
    Private WithEvents mHtmlDoc As mshtml.HTMLDocumentClass


   mHtmlDoc = CType(AxWebBrowser1.Document, mshtml.HTMLDocumentClass)

Works fine on my notebook.

However after deploying the app (on a Win2K Server with .NET Framework installed) 
the CType will always return <nothing>.


Does anyone know a workaround 

Any hints appreciated.
Tnx
Heiko


Answer this question

AxSHDocVw.AxWebBrowser

  • The_Assimilator

    FWIW, CType only returns Nothing if what you pass into it (AxWebBrowser1.Document) is Nothing. A failing cast would give you an InvalidCastException instead. But why the Document property is Nothing, I don't know.


  • AxSHDocVw.AxWebBrowser