
412
|
Chapter 12, Extending Visual Studio
#91 Change the Icon for Your Add-in
HACK
Creating the Icon
The first step is to create a satellite assembly and embed an icon in that
assembly. Yes, you actually have to create a new assembly; you can’t just
embed the resource in your add-in’s assembly!
1. Add a new Class Library Project to your Add-in Solution (File
➝ New ➝
Project).
2. Add a new bitmap to your project. Using the bitmap editor (just double-
click on your bitmap to open it), you can create a bitmap. The size of
the bitmap should be 16 by 16, and if you want to use transparency, use
Red: 0, Green: 254, Blue: 0. Figure 12-18 shows the bitmap editor.
3. Compile your Class Library Project and then click the Show All Files
button on the Solution Explorer.
4. Navigate to the obj
➝ Debug folder in the Solution Explorer and then
double-click on the .dll file.
5. Right-click on the root folder and select Add Resource as shown in
Figure 12-19.
Figure 12-18. Bitmap editor