Referencing MSHTML Library

  • Thread starter Thread starter Pat Mac
  • Start date Start date
P

Pat Mac

Ok, I'm stumped. I'm working with the axWebBrowser control and all of the
samples talk about adding a reference to the MSHTML library. I have the
..dll in my \windows\system32 directory, but when I'm trying to add the
reference to my VB.Net application I keep getting a "namespace or type
'mshtml' for Imports 'mshtml' cannot be found."

The code looks like:

Imports System
Imports Mshtml

Public Class Form1
....

End Class

Any help on how I can force a reference to this library into Visual Studio??
 
Hi Pat,

To set a reference (one method) is clicking on project in top of your Ide
and than choose "add reference". Mshtml is in the normal .Net box the rest
must be simple for you.

As exception. do not set an import with this MSHTML reference, it has so
many interfaces that your IDE freezes.

Just put everytime mshtm.xxxx before the things you use.

I hope this helps?

Cor
 
Cor, Thanks for the information. That got me onto the right track. The
only difference is that I found the reference under the COM tab, not the
..NET tab. Thanks again.
 
Hi Pat

I think the reference referred to under the .NET tab is actually
Microsoft.mshtml.

HTH

Charles
 
Back
Top