I wanted to create a custom control in Visual Studio, and then add it as a component to a Windows Form. So, I added a new "User Control" to the project, and edited it by dragging and dropping buttons, labels etc. Then, I want to be able to add this control to a form.
I've been told that I needed to build the project, and then add the .dll for the control to the toolbox items. So, I built the project, and then did Tools->Choose Toolbox Items. Here, I browsed through my project directory, and found the .exe for the project, which was found in MyProject\Debug. After this, my user control appeared in the list of toolbox items, with a gear wheel symbol next to it.
So, I then dragged this user control into my Windows form, but the control does not actually appear on the form. It doesn't give me any errors when I drag and drop, but the control is not added to the window, and does not appear in the source code for the form.
So I have done something wrong....one thing I notice is that I added the .exe for the project (MyProject\Debug\MyProject.exe) rather than a .dll for the user control, which is what I was looking for - but couldn't find one anywhere, despite having built the entire project.
Any ideas?? Thanks!