For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > December 2004 > Add icon to my ServerControl?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Add icon to my ServerControl?
Lars Netzel

2004-12-31, 3:57 pm

How do I add an Icon to be compiled with my WebCustomControl I just built. I
want to have my own Icon when adding it to the toolbox.

Going into the properties in the project itself and then the Build header...
the icon seltor field is disabled.. why?

/Lars


John Saunders

2004-12-31, 3:57 pm

"Lars Netzel" <troligt@apa.se> wrote in message
news:ecQOub17EHA.1400@TK2MSFTNGP11.phx.gbl...
> How do I add an Icon to be compiled with my WebCustomControl I just built.
> I want to have my own Icon when adding it to the toolbox.


In VS.NET, add to your project a 16x16 bitmap with the same name as the
control. Set its build action in its properties to "Embedded resource". This
should work.

There is also a ToolboxBitmapAttribute which you can use on the control, but
I don't know that I've ever used that.

> Going into the properties in the project itself and then the Build
> header... the icon seltor field is disabled.. why?


Because that's not what it's for.

John Saunders


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com