Component Icon

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nathanael Semhoun

    #1

    Component Icon

    I've create a .Net component but I don't know how to change is icon. I
    would like change the icon which is show on Design.

    Thanks
  • Dmitriy Lapshin [C# / .NET MVP]

    #2
    Re: Component Icon

    Hi,

    Apply the ToolBoxIcon attribute to the component class.

    --
    Dmitriy Lapshin [C# / .NET MVP]
    X-Unity Test Studio

    Bring the power of unit testing to VS .NET IDE

    "Nathanael Semhoun" <nathanael.semh oun@free.fr> wrote in message
    news:Xns9454A83 24343Cnathanael semhounff@62.4. 16.96...[color=blue]
    > I've create a .Net component but I don't know how to change is icon. I
    > would like change the icon which is show on Design.
    >
    > Thanks[/color]

    Comment

    • Bob Powell [MVP]

      #3
      Re: Component Icon

      Add a bitmap to the resources and set it build action to "embedded resource"

      Then use a ToolboxBitmap attribute to set up the bitmap for your component.
      Read up on the toolbox bitmap carefully in MSDN because you have to get the
      fully qualified name of the bitmap in the resources correct.

      --
      Bob Powell [MVP]
      C#, System.Drawing

      The November edition of Well Formed is now available.
      Learn how to create Shell Extensions in managed code.


      Answer those GDI+ questions with the GDI+ FAQ


      Read my Blog at http://bobpowelldotnet.blogspot.com

      "Nathanael Semhoun" <nathanael.semh oun@free.fr> wrote in message
      news:Xns9454A83 24343Cnathanael semhounff@62.4. 16.96...[color=blue]
      > I've create a .Net component but I don't know how to change is icon. I
      > would like change the icon which is show on Design.
      >
      > Thanks[/color]


      Comment

      • Dmitriy Lapshin [C# / .NET MVP]

        #4
        Re: Component Icon

        Sorry it is indeed ToolBoxBitmap, not ToolBoxIcon. Thanks, Bob!

        --
        Dmitriy Lapshin [C# / .NET MVP]
        X-Unity Test Studio

        Bring the power of unit testing to VS .NET IDE

        Comment

        Working...