User control & toolbox icon?
I provide toolbox icon for my control like this:
<ToolboxBitmap("C:\nb.bmp")> _
Public Class MyControl
and that works fine, but when I want to use my control on another computer, I must have .bmp file at the same location like on my computer (in this case 'C:\nb.bmp'). My question is: how to compile my control in that way that it contain .bmp file? Is that possible?
regard j
Re: User control & toolbox icon?
Quote:
Originally posted by janis
I provide toolbox icon for my control like this:
<ToolboxBitmap("C:\nb.bmp")> _
Public Class MyControl
and that works fine, but when I want to use my control on another computer, I must have .bmp file at the same location like on my computer (in this case 'C:\nb.bmp'). My question is: how to compile my control in that way that it contain .bmp file? Is that possible?
regard j
well you have to convert it to a resource file... gotto search the forum :)
By far the easiest way...
Hi Guy's.
The easiest way to add a toolboxbitmap is this:
If you have a control called TestControl, then just add a bitmap called
TestControl.bmp to the project, and compile it as an embedded
resource.
That's all. No need for attributes or anything else.
You won't see the change right away, but the
next time you add the tool to the toolbox, the bitmap
will be there.
BTW: The lower left pixel determines the transparent color.
(I think it the lower left....At least it's one of the corners!)