Harikrishna
Harikrishna

Reputation: 4305

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

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. And I can access them by writing code, but I want it in toolbox and want to use by just dragging it to the form.

Upvotes: 26

Views: 33313

Answers (5)

Rahul Sutar
Rahul Sutar

Reputation: 62

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

Upvotes: 0

Andrew Dennison
Andrew Dennison

Reputation: 1089

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

Upvotes: 1

Reza Majidi
Reza Majidi

Reputation: 1

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)

Upvotes: 0

Stormenet
Stormenet

Reputation: 26468

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

Upvotes: 1

Dave7896
Dave7896

Reputation: 829

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

Upvotes: 24

Related Questions