Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing Control's toolbox Image
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01231115
Message ID:
01231551
Vues:
16
Thanks for the response Pete! I'd tried all that and didn't work. I still have to try the method for when you have a namespace different than the default described here:

http://www.bobpowell.net/toolboxbitmap.htm

Enmanuel

>Hi Enmanuel, all these methods will accomplish what you need
>
>
>
>// Specifies the bitmap associated with the Button type.
>[ToolboxBitmap(typeof(Button))]
>class MyControl1 : UserControl
>{
>}
>// Specifies a bitmap file.
>[ToolboxBitmap(@"C:\Documents and Settings\Joe\MyPics\myImage.bmp")]
>class MyControl2 : UserControl
>{
>}
>// Specifies a type that indicates the assembly to search, and the name
>// of an image resource to look for.
>[ToolboxBitmap(typeof(MyControl), "MyControlBitmap")]
>class MyControl : UserControl
>{
>}
>
>
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform