This problem is related to the creation and use of a user control in WinForms. At first, when I found online tutorials, I created a user control library. The first attempt was to modify a checkbox control. Once compiled, it would show in the tool box and when dragged onto a form and double-click, the default event was "CheckChanged". I didn't need to add any further code to the user control itself. No extra default handler, attributes or so.
Then I added another, very similar control to the library, and this already caused problems. I discarded the lib and did this:
- Created a new WinForms user control in my project.
- Edited it in the designer like I wanted to have it.
- Built it, it showed up in the toolbox. Dragged onto my form, it looks as expected.
- Double-click now creates "load" event code. When wanting to change the event in the code of the form, the event CheckChanged isn't available.
So far I couldn't find out what went wrong between the first attempt and the others and why it doesn't work any more. Any ideas?