Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
Trouble using ToolboxBitmap attribute
Versions des environnements
Network:
Windows 2003 Server
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement