Hi,
I have created a new control and I need to pt it in the toolbox.
Actually, I have added a bitmap in ma solution and I code:
[ToolboxBitmap(typeof(OKButton), "button_ok.bmp")]
public class OKButton : Button
But, is it possible to use a bitmap in a .resx resources file ?
If yes, I don't find the syntax code.
Thanks for your help.
Jean-Luc (France)
Marc Gravell - 27 Mar 2008 11:06 GMT
Not as a resx AFAIK - but you can just mark the image file as an "Embedded
Resource" in the solution explorer, and use the name (in the way that you
are). The Type (typeof(OKButton) is used to get the resourcemanager - so the
image should be in the same project as IOKButon.
Marc
Marc Gravell - 27 Mar 2008 11:09 GMT
Note also that it (the image) often won't show in the toolbox when working
on the same project - only when working on a /separate/ project that
references it as binary.
Marc
J-L - 27 Mar 2008 11:26 GMT
Thanks a lot Marc ... always helpful :-)