Options->Windows Forms Designer->General->AutoToolboxPopulate\" property in VS 2005 set to true." />
开发者

How do I make components from other dlls accessible in the VS 2005 Toolbox?

I have the "Tools->Options->Windows Forms Designer->General->AutoToolboxPopulate" property in VS 2005 set to true.

I am referencing a DLL file with (public) custom components and forms in my project, but the components are not in the Toolbox. I tried adding them progra开发者_如何学Pythonmmatically in the "MyForm.Designer.cs" file, but that just messed up the designer.

Such an aggravating issue. Never been able to solve this. Does anyone know how to make these components appear in the Toolbox?


You need to add them to the toolbox manually. To do so, follow these steps:

  1. Right-click on the toolbox, and select "Choose Items" from the context menu.

  2. In the dialog that appears, make sure that the first tab (".NET Framework Components) is selected.

  3. Click the "Browse" button near the bottom of the tab page.

  4. Navigate to the DLL file that contains your custom controls/components, and open it.

  5. Any accessible components should be added to the listbox, and automatically checked. If you want to choose specific components from the library to exclude, uncheck them now.

  6. Click OK. All of the components that you selected should be added to the toolbox.


If/when you ever decide to remove those custom items from your toolbox, you can simply right-click on it, and select "Reset Toolbox" from the context menu. This will remove any items that you have added, and restore the contents of the toolbox to its default items.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜