Instead of assigning the toolbox bitmap manually, simply do the following:
- Rename the bitmap to the same first name as the control.
- Add the toolbar bitmap to the solution.
- Select the bitmap in the solution.
- In the bitmap properties, set the Build Action to Embedded Resource.
- In the bitmap properties, set the Custom Tool Namespace to the same namespace your control uses.
Visual Studio .NET will automatically find the bitmap when you add your control to the toolbox.
This was first published in May 2003