"Luis Arvayo" <am**********@prodigy.net.mx> wrote in message
news:Ot**************@TK2MSFTNGP14.phx.gbl...
Hi All,
I cannot made visible the toolbox bitmap for my controls.
I did the following:
- Namespace : foo
- Assembly: foo.dll
- Toolbox bitmap stored in subdirectory Resources. Resource bitmap defined
as embedded resource: MyControl.bmp
- Then the control toolboxbitmap attribute is defined like this:
[ToolboxBitmap(typeof(MyControl), "foo.Resources.MyControl.bmp")]
public class MyControl : System.ComponentModel.Component
Anyone have an idea ?
Thanks
I just did my first user control the other day and got the ToolboxBitmap to
work like this:
- Add MyControl.bmp to the project, in the same directory as MyControl.cs.
- Set the Build Action for MyControl.bmp to "Embedded Resource"
- Add the following attribute to the MyControl class:
[ToolboxBitmap(typeof(MyControl))]
Worked like a champ. It may be possible to do it another way but like I
said this was my first go at a user control so I'm no expert.
Good luck.
CVD