Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trouble using ToolboxBitmap attribute
Message
De
22/05/2009 13:31:59
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Trouble using ToolboxBitmap attribute
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01401570
Message ID:
01401570
Vues:
100
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform