0

I have this code in vb.net

dim WebBrowser = New SHDocVw.InternetExplorer

Obviously this code requires some library. Which one?

The code uses to work. I remove all references, and I forget which one I should add.

This page shows https://msdn.microsoft.com/en-us/library/ms970672.aspx that it should be microsoft.internetcontrol

However, I cannot find microsoft.internetcontrol among list of references.

enter image description here

Soroush
  • 907
  • 1
  • 9
  • 27
user4234
  • 1,523
  • 1
  • 20
  • 37

1 Answers1

3

Based on the following, you need to add the Microsoft Internet Controls COM object (not .NET assembly) for it to work.

In Visual Studio 2015: enter image description here

Community
  • 1
  • 1
syazdani
  • 4,760
  • 1
  • 26
  • 35
  • Before I select this as answer. Is there any general way or do we have to look up the web everytime? Why com object? Why not .net assembly? – user4234 Oct 09 '15 at 05:58
  • I've always just used an educated guess, but a good rule of thumb is that .NET Assemblies have a very well defined Namespace structure (Microsoft.Windows.blahblahblah or System.Data.blahblahblah) whereas COM objects have gibberish names (SHDocVw). When its a .NET assembly, you can usually find it in the .NET list via the Namespace prefix, but when its a COM object, I have to look it up online unless I know for a fact which one it is (i think it used to show you the short name as well in some previous versions of VS). – syazdani Oct 09 '15 at 15:55
  • Very well. Here's your 50. I have no uses of reputation besides this :) – user4234 Oct 10 '15 at 04:52