开发者

How to find the C# component that contains a particular class

开发者 https://www.devze.com 2023-01-23 12:07 出处:网络
I\'m creating an Internet Explorer plugin using C#. I\'ve been following a tutorial where the code imports a couple of classes that I don\'t have available, namely:

I'm creating an Internet Explorer plugin using C#. I've been following a tutorial where the code imports a couple of classes that I don't have available, namely:

using System.Windows;
using SHDocVw;

I realise I need to add the relevant components to my project but I'm not sure how to find the components that c开发者_如何学JAVAontain the classes. Perhaps there is a search somewhere?


Both of those examples are Namespaces that are located in assemblies that need to be reference. Luckily, adding those references are quite simple:

For System.Windows:

  1. Right click your project.
  2. Select "Add Reference..."
  3. Select the ".NET" tab and find the System.Windows assembly.
  4. Double click to add.

For SHDocVw:

  1. Right click your project.
  2. Select "Add Reference..."
  3. Select the "Browse" tab.
  4. Navigate to C:\Windows\System32
  5. Find SHDocVw.dll
  6. Double click to add.


First of all the code you posted are not class but namespaces.

You can fidn what component to add by looking on the documentaion of the namespace. Google after the namespace name and you will fidn the answer on MSDN.


its Microsoft Web Browser Control.

You should have it on your PC with name of

shdocvw32.dll

Reference it with your project.

Regards,

Mazhar Karimi

0

精彩评论

暂无评论...
验证码 换一张
取 消