I have a UserControl in my project called 'UIWizard.cs', and a 24-bit Bitmap named 'UIWizardToolboxBitmap.bmp' that has it's build action set to 'Embedded Resource'. I verified that it does exist in the manifest:
.mresource public BitFlex.Windows.Forms.Resources.UIWizardToolboxBitmap.bmp
{
// Offset: 0x00000000 Length: 0x00000336
}
I have tried these attribute declarations:
[ToolboxBitmap(typeof(UIWizard), "BitFlex.Windows.Forms.Resources.UIWizardToolboxBitmap.bmp")]
public partial class UIWizard : UserControl {
[ToolboxBitmap(typeof(UIWizard), "UIWizardToolboxBitmap.bmp")]
public partial class UIWizard : UserControl {
[ToolboxBitmap(typeof(UIWizard), "UIWizardToolboxBitmap")]
public partial class UIWizard : UserControl {
When I set my library to 'Release Build' and reference it in another project and add the ToolBox items manually using Choose Items... it still fails to display my bitmap properly. I want to avoid using a absolute path, because this is a source controlled project, and not everyone will be using the same mappings.
MSDN really isn't much help as the documentation on the ToolBoxBitmapAttribute is lacking, and most of what's on the web is pretty vague.
It is all bitmap format.
1. If I remember right we are used 256 colors, 16x16 73DPI bitmap.
2. Also try to add [ToolBoxItem(true)] to your class
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With