Bitmap prb ?
From: Johnny (nimporte.quoi_at_nospam.fr)
Date: 04/19/04
- Next message: Jemme: "Creating CAB files"
- Previous message: Herfried K. Wagner [MVP]: "Re: How to get lines in a textbox?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 19 Apr 2004 17:59:10 +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
{
...
}
}
--> I'm sorry, it's C# but with VB.Net it's certainly something like
this :
...
Namespace Util.WinForm.Ctrl
...
<ToolboxItem(True)> _
<ToolboxBitmap(GetType(Util.WinForm.Ctrl.Frame3D), "Frame3D")> _
Public Class Frame3D
Inherits System.Windows.Forms.Control
...
End Class
End Namespace
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: Jemme: "Creating CAB files"
- Previous message: Herfried K. Wagner [MVP]: "Re: How to get lines in a textbox?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|