Results 1 to 3 of 3

Thread: Icon of own control

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2002
    Posts
    79

    Icon of own control

    I have just created an own control. I know how to include it into the toolbox. But I would like my control have a specific icon in the toolbox. How can I do it?

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Easy . First your image should be 16X16 with color of 16bit . Then add that as resource file . Change Build action as embedded resource. After that , add this attribute to your class . like so :

    [ToolboxItem(true)]
    [ToolboxBitmap(typeof(myprojectname))]
    public class blah : foo .

    that's all .

  3. #3
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    For distributive purposes, Pirate's method is the one you want. For your own in-house use, just include a bmp with the same name as the class of your control. The IDE will automatically pick it up.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width