Toolbox icons for multiple controls in windows control library (.NET)
-
Hi, I have 4 individual windows controls in a single windows control lib. Is there a way I can assign a unique icon to each of them? Maybe I have to break them into separate projects. Thanks. Nursey
Put the ToolBoxBitmap attribute on each control class:
<ToolboxBitmap(GetType(MyControl), "MyControlBitmap.bmp")>
Include the bitmap you specified ("MyControlBitmap.bmp" in the above example) in the control's resource file, with the name you specified ("MyControlBitmap.bmp" here).
**"A people that values its privileges above its principles soon loses both." -- Dwight D. Eisenhower
-
Put the ToolBoxBitmap attribute on each control class:
<ToolboxBitmap(GetType(MyControl), "MyControlBitmap.bmp")>
Include the bitmap you specified ("MyControlBitmap.bmp" in the above example) in the control's resource file, with the name you specified ("MyControlBitmap.bmp" here).
**"A people that values its privileges above its principles soon loses both." -- Dwight D. Eisenhower
OK, I have 4 controls, 4 bitmaps all 16x16 using 16 color palette. Two of my controls display their toolbox bitmap and two display the old cog yellow cog wheel. What the heck is going on here. Here is an example of one of my attributes. I've rebuilt the assembly, unreferenced and rerefenced it, quit the IDE and gone back in, and everything I can think of. _ Thanks. Nursey