I have finally gotten this to work after trying just about every conceivable way. What finally got it working for me was this.
16x16x16colors bmp
had to put it in the root folder alongside the control and named the same as the control (not the full qualified name though - in this case just MycontrolName.bmp)
the tag I used on the control class was of the following format
not the method with 2 params as i have seen elsewhere
i had to remove it from the toolbox and add it back to see the effect
I did not need an assembly reference anywhere
You can tell if it is going to work because you should see the icon when you are adding the toolbox item in the choose item dialog box.
the only issue I have now is that I have this lone image file hanging out in my root folder but hey its the price you pay i guess. I think that is all the pertinent details. Hope this helps someone else and good luck if you
are stuck on this one.
VBAHole22
Member
352 Points
73 Posts
Re: Icon for custom server control
Apr 13, 2006 04:52 AM|LINK
I have finally gotten this to work after trying just about every conceivable way. What finally got it working for me was this.
16x16x16colors bmp
had to put it in the root folder alongside the control and named the same as the control (not the full qualified name though - in this case just MycontrolName.bmp)
the tag I used on the control class was of the following format
System.Drawing.
ToolboxBitmap(typeof(MyFullAssemblyName.MycontrolName))not the method with 2 params as i have seen elsewhere
i had to remove it from the toolbox and add it back to see the effect
I did not need an assembly reference anywhere
You can tell if it is going to work because you should see the icon when you are adding the toolbox item in the choose item dialog box.
the only issue I have now is that I have this lone image file hanging out in my root folder but hey its the price you pay i guess. I think that is all the pertinent details. Hope this helps someone else and good luck if you are stuck on this one.