Should I have attempted CType axWebBrowser to SHdocVW.IWebBrowser2 as below
dim ppDisp as AxSHdocVw.AxWebBrowser = _
new AxSHdocVw.AxWebBrowser()
...
Dim doc As MSHTML.HTMLDocument = _
CType(CType(ppDisp,SHDocVw.IWebBrowser2) _
.Document, MSHTML.HTMLDocument)
the form application closes after starting executing the above statement
during debug No error message was given, I tried also within try -catch end
try hoping to find out the cause but nothing shows up
the statement is part of attempt to connect to IEHTMLDocumentEvents which
implements MSHTML.HTMLDocumentEvents2
what should I do instead?
btw it made no difference if I use DirectCast instead of CType - as a matter
of course.