21

It's used on several websites which all seem to assume the reader knows what to do to have this type available, but I have no clue.

Example site, see the first comment: http://blogs.artinsoft.net/mrojas/archive/2008/09/18/newwindow2-events-in-the-c-webbrowsercontrol.aspx

starblue
  • 55,348
  • 14
  • 97
  • 151
marc40000
  • 3,167
  • 9
  • 41
  • 63

3 Answers3

34

It's not an assembly, it's a COM component. Project + Add Reference, Browse tab, select c:\windows\system32\shdocvw.dll. In Windows 7 pick shdocvw.tlb in the same directory instead. This generates the interop library for the COM component with the SHDocVw namespace. WebBrowser_V1 is one of the types you'll get from that.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • 6
    For future searchers: shdocvw.tlb was not in my Windows 7 install for some reason. However, importing the Microsoft Internet Controls COM reference got me access to SHDocVw. – paul Nov 06 '12 at 14:18
22

You can get it from the COM component list. The assembly name is "Microsoft Internet Controls".

  1. Right click "References" of your project in Solution Explorer view
  2. Click Add Reference
  3. Go to COM section
  4. Select Microsoft Internet Controls
  5. Click OK
nawfal
  • 70,104
  • 56
  • 326
  • 368
9

Add a COM reference to c:\windows\system\shdocvw.dll

This will create a .NET reference Interop.shdocvw.dll (or something similar) that includes the appropriate types.

ConsultUtah
  • 6,639
  • 3
  • 32
  • 51