المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : ToolboxBitmap isn't working... The on going saga



C# Programming
04-01-2009, 10:21 PM
I have created two UserControls to try and resolve this.

namespace libSigCntrl
{
//[ToolboxItem(true)]
//[ToolboxBitmap(typeof(ctrlBankBitSW), "ctrlBankBitSW.bmp")]
[ToolboxBitmap(typeof(ctrlBankBitSW))]
public partial class ctrlBankBitSW : UserControl
{
public ctrlBankBitSW()
{
InitializeComponent();
}
}
}
namespace libSigCntrl
{
//[ToolboxItem(true)]
//[ToolboxBitmap(typeof(ctrlBitSW), "ctrlBitSW")]
[ToolboxBitmap(typeof(ctrlBitSW))]
public partial class ctrlBitSW : UserControl
{
public ctrlBitSW()
{
InitializeComponent();
}
}
}
The commented lines represent other attempts.
There are bitmaps for each of the controls added to the project
libSigCtrl
-
-
- ctrlBankBitSW.bmp
- ctrlBankBitSW.cs
.
.
- ctrlBitSW.bmp
- ctrlBitSW.cs

The Bitmaps have there "Build Actions" = been set to "Embeded Resource"
The Bitmaps are 16x16 at 16 color.
The Output Type is "Class Library".

This is driving me nuts. http://www.barakasoft.com/script/Forums/Images/smiley_WTF.gif