problem with ToolboxBitmap ?
From: Johnny (nimporte.quoi_at_nospam.fr)
Date: 04/19/04
- Next message: Dave Leach: "How to use a Type to cast ComboBox.SelectedItem assignment?"
- Previous message: Nicolás Castagnet: "Custom controls: File or assembly name Dlya.UiLibrary, or one of its dependencies, was not found."
- Next in thread: Özden Irmak: "Re: problem with ToolboxBitmap ?"
- Reply: Özden Irmak: "Re: problem with ToolboxBitmap ?"
- Reply: Bob Powell [MVP]: "Re: problem with ToolboxBitmap ?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 19 Apr 2004 17:54:08 +0200
Hi all,
Sorry for me poor english :-(
I'm creating a control derived from System.Windows.Forms.Control
I want my own bitmap to be displayed in the toolbox
I create a bitmap 16*16 called "Frame3D.BMP"
I create a resource file called "Frame3D.resources"
This resource file contains just one item : a System.Drawing.Bitmap
called Frame3D with my bitmap
I add the ressource file to my project
After compiling the resource file is included in the DLL.
The structure of the DLL is :
(-) Frame3D
(-) frame3d.dll
(-) Dependencies
mscorlib
(+) System.Windows.Froms
(+) System.Drawing
(+) System
(-) Util.Winform.Ctrl
(+) Frame3D
(-) Resources
(-) Frame3D.resources
Frame3D : Bitmap
As regards source file, I wrote :
...
namespace Util.WinForm.Ctrl
{
...
[ToolboxItem(true)]
[ToolboxBitmap(typeof(Util.WinForm.Ctrl.Frame3D), "Frame3D")]
public class Frame3D : System.Windows.Forms.Control
{
...
}
}
After compiling, I add the assembly (called Frame3D.dll) to the GAC
All works fine, the control works fine...
But when I add the control to the toolbox, I don't see my bitmap ? I
see something that looks like to a wheel ?
I use SharpDevelop 0.99b and tried with C#Builber Personal, but the
problem is the same...
A I mising something ?
Thanks
-- Ceci est une signature automatique de MesNews. Site : http://mesnews.no-ip.com
- Next message: Dave Leach: "How to use a Type to cast ComboBox.SelectedItem assignment?"
- Previous message: Nicolás Castagnet: "Custom controls: File or assembly name Dlya.UiLibrary, or one of its dependencies, was not found."
- Next in thread: Özden Irmak: "Re: problem with ToolboxBitmap ?"
- Reply: Özden Irmak: "Re: problem with ToolboxBitmap ?"
- Reply: Bob Powell [MVP]: "Re: problem with ToolboxBitmap ?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|