Let me start with some background:
When developing a C # project, I found that many of the controls were reused, and the properties of the control were set to the same, and I wondered if I could set a class to hold the control, so that I could add a special operation to it every time I used it, without having to set the properties of the control again.
For a while, a custom control can be a requirement, and it can develop custom controls that inherit existing controls so that I can encapsulate my own library of controls.
After completing the custom control, I added this reference to another project based on MSDN's demo guide (e.g., Combutton), but in the next step there was a problem, and I found that my custom control was not being searched in the toolbox, that is, it was not displayed. I can't use it.
Finally I solved the problem, and for myself or to be able to help others, I recorded the solution here.
cause 1: No references were added. in the project that needs to use this custom control, in the reference, right-click, add Reference, browse, find the DLL (for example: ComButton.dll), add, at this time, the control should be able to automatically add to the Toolbox. If not, then keep looking down.
cause 2: The AutoFill Toolbox is not set to true. in Visual Studio, select Tools, Options, Windows Forms Designer, general, auto-populate toolbox set to True. Or that sentence, if the control does not appear, continue looking down.
cause 3: You need to add it manually into the toolbox. my problem is here, too. In the Toolbox, right-click, select items, the. NET Framework Components page (the first load will be a bit slow, patience, etc.), at this time, the inside is not find our control, need to click Browse, find the DLL, add, click OK.
With the top three steps, this problem should all be resolved, if not, there may be a problem with VS or need to re-open vs.
C # Custom controls do not appear in the toolbox after adding references to the workaround