Hi!!
I have make an custom Control that inherits from textbox and adds it severar validation functions and maskedit. Now I want to add a icon to this control to showit in the IDE ToolBox and add it to forms in design graphical mode.
How can I add a "toolbox Icon" to my control

Custom Contro Icon
Art Johnson
<edit>
ack, sorry, i misread your post...here's how to add an icon...this assumes VS.NET...
add an image to your project, click on the image and go to it's properties...change the Build Action to Embedded Resource
then, add this attribute to your control (at the top of the class)
ToolboxBitmap(GetType(MyCustomControl), "MyIcon.bmp")
</edit>
16 x 16 is the requirement for an icon...I believe you can so many different file formats...i use either ico or bmp
Matt213213
c# crack
LittleG
If you're not seeing your bitmap, my guess is that either you're using a bitmap that's too large, has too many colors, or you've neglected to set the BuildAction property for the bitmap resource to Embedded Resource.
Manik_Mahajan_3112ff
Thank you,
I do something like this:
<ToolboxBitmap(GetType(ValidText), "ValidText.bmp")> _
Public Class ValidText
and I add the ValidText.bmp to the project, but ToolboxBitmap not is recogniced only Toolboxitem and Toolboxitemfilter.
What can it be
Give an email and i send you my custom control an help me.
:^)
St1ck
Ken Getz, I thought it was the upper-left hand corner (0, 0) that the transparency comes from. Is that not the case
Benjamin Coats
Dacryphil
It is not necessary to use an attribute.
Anonymous1673443