Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble using ToolboxBitmap attribute
Message
From
22/05/2009 13:31:59
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Trouble using ToolboxBitmap attribute
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01401570
Message ID:
01401570
Views:
101
I have subclassed the mmTextBox class as myTextBox in my Windows Forms Project. I have added myTextBox to the Toolbox in Visual Studio 2008. I can successfully use myTextBox objects in my application.

I want to have the standard bitmap for textboxes appear in the Visual Studio toolbox for myTextBox. I have added the following attribute code immediately before the myTextBox class declaration:

[ToolboxBitmap(typeof(TextBox))]

The bitmap that appears in the toolbox is still the default cog wheel rather than the textbox bitmap. The atribute code I have used is exactly the same as the attribute code used by MM .NET in the mmTextBox class. Why does the mmTextBox class show the correct textbox bitmap in the toolbox and myTextBox class does not?

I do not need to create a new bitmap, I just want to use the standard textbox bitmap like MM .Net uses for its mmTextBox. Every web article I have found says what I have done should work correctly.

Sam
Next
Reply
Map
View

Click here to load this message in the networking platform