Solution for "No components can be placed in the toolbox" in DLL

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.