I am woking on a Control Library that I call CcNet2005. Some of the controls are based on exisiting windows forms controls whilst others are based on 'UserControl' or 'Component'. I have included a 16 x 16 Bitmap for each control as an Embedded Resource in the Library and each bitmap is named the same as its target Control. I cannot seem to get a working ToolboxBitmap for any of the controls in the library, I just get the default Gear bitmap.
Is this a restriction because it is an Express Version?Am I missing something fundamental? Could there be something else that I need to do beyond using the correct constructor?
Here is a sample of the ways I have tried to get the ToolboxBitmap to work.// None of these constructor versions seem to work
namespace CcNet2005{ [ToolboxBitmap(@"..\Resources\C_DataView.bmp"), Description("CcNet2005 Data View/Edit Control")] public partial class C_DataView : UserControl { #region "The Code" //Some Really Clever stuff #endregion }}
namespace CcNet2005{[ToolboxBitmap(typeof(C_DataView)), Description("CcNet2005 Data View/Edit Control")] public partial class C_DataView : UserControl { #region "The Code" //Some Really Clever stuff #endregion }}
namespace CcNet2005{[ToolboxBitmap(typeof(C_DataView), "C_DataView"), Description("CcNet2005 Data View/Edit Control")] public partial class C_DataView : UserControl { #region "The Code" //Some Really Clever stuff #endregion }}namespace CcNet2005{[ToolboxBitmap(typeof(C_DataView), "C_DataView.bmp"), Description("CcNet2005 Data View/Edit Control")] public partial class C_DataView : UserControl { #region "The Code" //Some Really Clever stuff #endregion }} FYI: Using Visual C# 2005 Express Edition to create the Control Library. Have tested the control libary and all controls work as expected other than the problem as described. Have tried the Control Library in a Windows Application using both Visual C# 2005 Express and Visual Basic 2005 Express Edition. Same Results in both cases.If anyone can see what I am doing wrong or knows why the problem exists, Iwould appreciate being enlightened.Cheers!