|
-
Sep 9th, 2003, 03:48 PM
#1
Thread Starter
New Member
Control Icon?
Hi,
I am playing around with make my own controls and everything is going ok: I has created my controls and registered it succesfully in Windows with Regsvr32. But now, there is a simple question: how can I set my own icon to be showed in the components window, instead that regular one (the four little boxes with a pencil)?
Thanks!
-
Sep 9th, 2003, 05:45 PM
#2
Set the ToolBoxBitmap property of the Usercontrol.
-
Sep 9th, 2003, 08:58 PM
#3
Thread Starter
New Member
Thanks Bruce, it worked.
I have another doubt: why the icon I draw becomes smaller than the other icons on the component bar?
-
Sep 10th, 2003, 02:39 PM
#4
Hyperactive Member
Nobody is smarter than all of us!
-
Sep 10th, 2003, 10:33 PM
#5
Thread Starter
New Member
Hi,
I was researching a little and found out that the maximum size accepted is about 15 x 16 pixels. For any unknown reason, the VB native controls can break this barrier.
I had some problem about the icon quality too: the most os time they appeared distorted, and some other times, some colours didn't appears.
After a lot of experiences, I realized that:
1) The icons made in Photoshop or another pro image application don't behavior well, even if you save it as BMP file because they deal with at least a 256 colors pallete. Seems that VB likes icons saved in 16 colors mode. Then, I liked to use the Windows Paintbrush to do that 
2) If you use a solid background colour, this color can disappear. I think that VB guess that this is the colour to be the transparent one (???). Anyway, I realized that the problem disappears if you build a margin with 1 pixel round the entire icon, but don't use the same colour of the margin inside the icon, or this color will transparent. For instances, if you draw a red border all over the icon (a square), when you draw something in red colour inside the icon it will be transparent instead red.
Maybe I am beeing confusing???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|