This article focuses on adding custom DLL through "select item" in the vs2012 toolbox, as shown in. net type, there is a common solution to the problem of "No components can be placed in the toolbox.
Problem description:
Solution:
[1] The encapsulated dll has a problem.
1.When writing extended classes of the control library,
No public keyword addedSuch:
public class MyListView: System.Windows.Forms.ListView{ public MyListView() { }}
If public is removed, dll can also be generated, but this error is prompted when you add it to the user control.
2.When writing extended classes of the control library,No empty Constructor, Even if there is a constructor with parameters, there should be null constructor, such:
public class FirstControl : Control{ public FirstControl() { } public FirstControl(string strTitle) { }}
[2] problems with vs2012 in later versions
To add controls in vs2012 and 2010, select items> browse> select component type> browse> select DLL... However, vs2010 can recognize DLL controls, but vs2012 has the problem of "No components can be placed on the toolbox". This is a simple solution:
Click the DLL you want to add, hold down the left mouse button, and drag the DLL directly to the toolbox !!
Solution for "No components can be placed in the toolbox" in DLL