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.

Reply via email to