M
miktro
I have an VB.Net desktop application where I am hosting a WebBrowser.
I need to interact with the events in the browser.
I encountered the normal problem of, after adding events the normal click
on the browser didn't work (in particular you can't enter text into
textareas).
I found the Microsoft KB article 311284 - "How to handle document evetns
in VB.Net" - and implemented the code.
However when I run the application I get the following error:
--------------Error Message------------------------------------------
Doc Complete Error: Could not load type mshtml.HTMLDocumentEvents2 from
assembly WindowsApplication1, Version=1.0.2155.37390, Culture=neutral,
PublicKeyToken=null.
at System.Type.GetType(String typeName, Boolean throwOnError, Boolean
ignoreCase)
at WindowsApplication1.IEEvents.DocumentComplete(Object pDisp, Object&
URL) in D:\WinXP\jobs\WebBrowser\HTMEvents\VB\IEEvents.vb:line 204
--------------------------------------------------------------------
where lines 203-204 are:
--------------------------------------------------------------------
203: Dim tt As System.Type
204: tt = System.Type.GetType("mshtml.HTMLDocumentEvents2", True, True)
--------------------------------------------------------------------
Why can't the application find 'mshtml.HTMLdocumentevents2'?
And what do I need to change / add to the application
(like building an interop for mshtml?).
Any help greatly appreciated.
Mike
I need to interact with the events in the browser.
I encountered the normal problem of, after adding events the normal click
on the browser didn't work (in particular you can't enter text into
textareas).
I found the Microsoft KB article 311284 - "How to handle document evetns
in VB.Net" - and implemented the code.
However when I run the application I get the following error:
--------------Error Message------------------------------------------
Doc Complete Error: Could not load type mshtml.HTMLDocumentEvents2 from
assembly WindowsApplication1, Version=1.0.2155.37390, Culture=neutral,
PublicKeyToken=null.
at System.Type.GetType(String typeName, Boolean throwOnError, Boolean
ignoreCase)
at WindowsApplication1.IEEvents.DocumentComplete(Object pDisp, Object&
URL) in D:\WinXP\jobs\WebBrowser\HTMEvents\VB\IEEvents.vb:line 204
--------------------------------------------------------------------
where lines 203-204 are:
--------------------------------------------------------------------
203: Dim tt As System.Type
204: tt = System.Type.GetType("mshtml.HTMLDocumentEvents2", True, True)
--------------------------------------------------------------------
Why can't the application find 'mshtml.HTMLdocumentevents2'?
And what do I need to change / add to the application
(like building an interop for mshtml?).
Any help greatly appreciated.
Mike