Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing Control's toolbox Image
Message
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01231115
Message ID:
01231551
Views:
17
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform