ToolBoxBitmap

Hi

I am trying to add a 16x16 (16 Color) to MyUserControl with no success.
Here is what I tried:

1). Create the Bitmap and place the bitmap in the same folder as my solution.
Filename: MyBitmap.Bmp
2). Add Existing Item (Image File) Build Action - Embedded Resource
(MyBitmap.Bmp is displayed in the Solution Explorer)
3).Imports System.ComponentModel
Imports System.Drawing

<ToolboxBitmap(
GetType(MyUserControl),"MyBitmap.bmp")> _
PublicClass MyUserControl
Inherits System.Windows.Forms.UserControl
...
EndClass

Save/Rebuild

I Selected the Form/Toolbox still see the Gear

What am I doing wrong? Is (16 Color) the limit?

Thanks
David

[1297 byte] By [dicjb] at [2007-12-17]
# 1
Rebuild/Start New Project/Choose Item/Browse/select the Dll - worked...

Found this on Web...

The ToolboxBitmap property is read/write at the control's authoring time,
and not available at the control's run time. This means that if you are working on your project directly, draw your usercontrol onto a form in that project, you do not have access to the ToolBoxBitmap property because you are in the control's run time. You can only set this in the properties window when you are working on the control directly, even if you are in the same program group that a control happens to be associated with.

dicjb at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...