How to convert inherited control into DLL in c# csharp .net

I have several inherited controls (text boxes, combo boxes) which I can drag from the tool box and drop on the form.

But I would like to make them into DLL's, so that I can use them in various future projects? How do I do that?

Who is Participating?
yaronusaConnect With a Mentor Author Commented:
OK, it was a simple mistake: the access modifier to my class was not public; an inherited control that is put into a class library project for the purpose of being referenced by other projects needs its inherited classes that represent controls be publicly accessible.

Thank you for helping me find the solution; couldn't do it without you.
Anurag ThakurConnect With a Mentor Technical ManagerCommented:
create a class library project and add all the controls to it
then add the reference to the project in which you want to use the controls
if you want to add the controls to the tool box then select add remove and select the assembly and add to the toolbox and then you can drag and drop the controls to the user interface as other windows controls
yaronusaAuthor Commented:
So I started a class library project, and added all the files to it, but I am having a problem with the following using statement on all the inherited controls:

using System.Windows.Forms;

Windows is underlined, and cannot be found, even with the intellisense.

Am I on the right track?

What will the reference to this class library project be? The namespace of my class library is CustomTextBoxes and the project name is TextBoxes.

Thank for your help I really appreciate it.
Anurag ThakurConnect With a Mentor Technical ManagerCommented:
System.Windows.Forms (in System.Windows.Forms.dll)
yaronusaAuthor Commented:
 I added the reference System.Windows.Forms to the TextBoxes project and the Windows is no longer underlined.
 To compile the Class Library project, I created an executable project.
 Then I created a new Windows Application called TestDriveTextBoxes project, and I added a reference to the TextBoxes.dll that was generated. But none of my inherited controls have shown in the toolbox anywhere.
 So I went back to the TestDriveTextBoxes project and in the toolbox, under the category 'TextBoxes Components' it says "There are no usable controls in this group. Drag an item onto this text to add it to the toolbox." So I try to do that, but it can't go on there.

Do you know why the inherited controls are not showing?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.