Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

I am recieving an error message that is stoping my document from appearing in my application. Can anyone help me to understand what is going on that causes this error and point me in the right direction to help me resolve it.

 

The error reads

 

"System.InvalidCastException:

 

Unable to cast COM object of type 'System.__ComObject' to class type 'mshtml.HTMLAnchorElementClass'.

 

COM components that enter the CLR and do not support IProvideClassInfo or that do not have any interop assembly registered will be wrapped in the __ComObject type.

 

 

Instances of this type cannot be cast to any other class;

 

however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.

 

 

at My.UserControls.HTMLView.ExtractControls.ExtractInfoFromToolStrip(HtmlElement element, ToolStrip toolStrip)"

 

I would be grateful if this could be demonstrated in any way but any pointer would be good to help be find the cause. I have looked at documentation on the microsoft site but dont fully understand what is happening.

 

Many thanks

 

Nigel

  • 2 months later...
Posted
Is the only solution to actually use the old axWebBrowser control from VB6? I haven't seen another way around this and some other limitations of the VB.Net WebBrowser control.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...