It happens something strange. In the manifest there is the assembly name added MyAssembly.MyNamespace.MyControl.bmp whereas the filename is MyNamespace.MyControl.bmp.
Pierre ----------------------------------------------- Pierre Greborio [EMAIL PROTECTED] http://www.pierregreborio.it ----------------------------------------------- -----Original Message----- From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of Ian Griffiths Sent: Tuesday, May 28, 2002 12:21 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] ToolboxBitmap bug ? Did you actually call the BMP file "MyNamespace.MyControl.bmp"? As opposed to "MyControl.bmp"? VS.NET always puts in the default namespace for you, so if you put that into the filename yourself it will be in there twice! Look at your compiled component with ILDASM. All the embedded resources are listed in the MANIFEST. You'll see what they are really called there. Also, remember these things are case sensitive - check the case is correct. -- Ian Griffiths DevelopMentor ----- Original Message ----- From: "Pierre Greborio" <[EMAIL PROTECTED]> > Hi, > I've written a custom control and I need to create my own image. The > control is MyNamespace.MyControl and the bitmap (16x16) is > MyNamespace.MyControl.bmp (build as embedded resource). If I set the > attribute ToolboxBitmap with the filename it correctly show the image, > if I set with type ToolboxBitmap(typeof(MyNamespace.MyControl)) it > shows the default image and not my own. Is it a bug ? You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.