Groups | Blog | Home
all groups > vb.net controls > january 2005 >

vb.net controls : Create or add icon to a component?



Jerry H.
1/10/2005 10:14:20 AM
I've successfully put together a couple of small components that I can
add to the VS Toolbox. However, they both default to the "gear" icon.


If I highlight the project for the component in Solution Explorer, and
then select "Project | Properties" there is an "Application Icon"
setting that is disabled under "Common Properties | Build". Of course,
my project is a component, not an app so I can see why it's disabled,
but I don't see any other places to set up and icon.

What is the easiest way to customize my component with it's own unique
icon?
Herfried K. Wagner [MVP]
1/10/2005 7:42:18 PM
"Jerry H." <boilersrock@gmail.com> schrieb:
[quoted text, click to view]

Create a 16 x 16 pixd give it the name of the class ('Class BlaBla' ->
"BlaBla.bmp"). Then you can add the bitmap to the project and set its build
action to embedded resource. Extend your code like this:

\\\
<ToolboxBitmap(GetType(BlaBla))>
Public Class BlaBla
.
.
.
End Class
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
AddThis Social Bookmark Button