How to add User control in the toolbox for C#.net for winforms by importing the dll to the reference?

后端 未结 5 1922
温柔的废话
温柔的废话 2020-12-17 08:14

I have one dll of usercontrol and I add to it to the references in my project. And now I want to access this usercontrol from toolbox but it does not appear in the toolbox.

相关标签:
5条回答
  • 2020-12-17 08:52

    Right Click on empty field of toolbox and select "choose item" and then go to your project folder and select your dll file (or EXE file)

    0 讨论(0)
  • 2020-12-17 08:57

    Right click on the toolbox -> Choose items...

    0 讨论(0)
  • 2020-12-17 09:03

    You need to right click on the toolbox, select "Choose Items.." and browse to the dll containing the control.

    0 讨论(0)
  • 2020-12-17 09:12

    Drag & Drop the dll (from explorer) to the desired category (in VS 2012).

    0 讨论(0)
  • 2020-12-17 09:12

    The user control must have a default constructor. Otherwise it is not shown in the choose items pop-up. It might be also necessary to rebuild solution to add it to toolbox.

    Here is the reference

    0 讨论(0)
提交回复
热议问题