General information
Category:
The Mere Mortals .NET Framework
Title:
Trouble using ToolboxBitmap attribute
Environment versions
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only