Toolbox bitmaps
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcontrolsvb' list.


Anders.Vikstrom@banqit.com
Does anybody know how to providing a toolbox bitmap for a control?

Regards,=20

Anders Vikstr=F6m
SW Engineering, BANQIT AB
http://www.banqit.com
mailto:Click here to reveal e-mail address
Phone: +46 8 7594737

Reply to this message...
 
    
Paul D. Murphy

Susan sent me this a couple of months ago when I asked this question.

Specifying the toolbox icon=20
The toolbox will look in the control's assembly for an embedded image to
display as the toolbox icon. The image must satisfy all of these
requirements:

=B7 Must be a bitmap (.BMP) file=20
=B7 Format must be 16x16 pixels, 16-bit color=20
=B7 Filename must match the control's class name. For example:
Label.bmp where for a control named Label.=20

When creating the bitmap, you will probably wish the background of the
image to be transparent so your icon's background is the color of the
toolbox regardless of user desktop settings. VS.NET uses the pixel in
the lower left corner to determine the color that should become
transparent when the icon is displayed in the designer. In this
example, the green color will become a transparent background for the
icon:

=20

If you are creating the control in VS.NET, it's easy to mark the image
as an embedded resource. Add the BMP file to the same project as the
control, and set it's name to match the controls class. Then select the
BMP file in Solution Explorer, and set it's Build Action property in the
Properties window to "Embedded Resource".

Paul

-----Original Message-----
From: Click here to reveal e-mail address [mailto:Click here to reveal e-mail address]=20
Sent: Monday, September 17, 2001 7:19 AM
To: aspngcontrolsvb
Subject: [aspngcontrolsvb] Toolbox bitmaps

Does anybody know how to providing a toolbox bitmap for a control?

Regards,=20

Anders Vikstr=F6m
SW Engineering, BANQIT AB
http://www.banqit.com
mailto:Click here to reveal e-mail address
Phone: +46 8 7594737

| [aspngcontrolsvb] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngcontrolsvb.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

Reply to this message...
 
 
System.Reflection.Emit.Label




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com