O'Reilly logo

Microsoft® Visual Studio® 2010 Unleashed by Lars Powers, Mike Snell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the User Control

First, you can work on getting in place a user control that has the functionality you are looking for. After you have a workable control, you can worry about wiring that control into Visual Studio using the Connect class created by the Add-in Wizard.

Add a user control (called PaletteControl) to the add-in project by selecting Project, Add User Control. After the control is added, you place nine controls on the user control design surface. First, add a picture box, which is used to display the palette of colors, stored as a simple bitmap in a resource file (in this case, we’re using a color palette from a popular paint program as our source for the bitmap). With the palette in place, you now need six label controls to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required