custom control icon

  • 13 years ago

    so I made my own custom control dll to add to my toolbox ....

    it gives me a default icon ... what looks like a blue wheel or something ...

    I couldn't find an icon property anywhere, how do I give my tool its own icon?

  • 13 years ago
    There is no property because that has nothing to do with the class as it's used in code.  That is purely design-time behaviour and, like all design-time behaviour, it is controlled by attributes.  In this case it's the ToolboxBitmap attribute.  Check out the documentation for the ToolboxBitmapAttribute class for more information.
  • 13 years ago

     Hi there,

    Your bitmap file name must be like your Control fullname : Test.UI.WebControls.LinkButton.bmp

    And set "Build Action" property of bitmap file to "Embedded Resource".
  • 13 years ago

    I've figured this out now, thanks for the help

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.” - Donald Knuth