I'm using a CommandButton with a graphical style.
When the button has the focus, an ugly focus rectangle appears on it. Is there a way to remove it?
Printable View
I'm using a CommandButton with a graphical style.
When the button has the focus, an ugly focus rectangle appears on it. Is there a way to remove it?
I don't know how.
I use imageboxes as they load the images faster
and with the stretch propety set to true them
look very good. If you want a real button look
you just buttonize your image.
http://www10.ewebcity.com/dirtbagdog/main.htm
all the buttons there are just images.
The problem is that my button has the 'Button Face' constant for the BackColor property, and a graphical CommandButton lets you use a Mask color in order to draw the picture with a transparent background, I can't see any other way to do that. :o
Not everybody has this gray color as a window color, and I want my app to look good anywhere. :(
I build a lot of link buttons on Web pages using images (a text image at first, then a glowing text image on a mouseover).
I get the same stupid focus rectangle after they're selected, but only with IE! (I'm using IE5).
Netscape does not have this problem.
I wonder if this is a Microsoft thing?
Have never played with that..interesting.
How does it work?
HeSaidJoe: The graphical CommandButton or the MouseOver?
the mask of the command button procedure
do you paint the picture on or just load
a picture and set the mask...
I have no idea how you would use just the image
but it sounds interesting.
Transparant background on a picture button.
do you have an example
It's not complicated at all :D :
Add a regular 'CommandButton' to your form.
Set it's 'Style' property to '1 - Graphical'.
Set the 'Picture' property to whatever picture you want.
Set the 'MaskColor' property to whatever color you want to be transparent.
And set the 'UseMaskColor' property to 'True'.
That's all.
Just make sure the RGB for the mask color is exactly the RGB of the color on your picture.
Let me know.
thanks ScOrp...
get back later....the wife is yanking my chain so I gotta get out of here.
I still like image control over style 1 buttons. Here is an example of
what it looks like. Mind you there was no effort to clean up the images etc
as this was just a fly bye for a Demo
all you need is to set the form background and the image.gif's background to the same
and you have instant custome shapes.
Wayne
That's not the problem... :(
The default window backcolor varies from user to user, thus, I can't make a background for my image that will fit to all users. I need a way to blit with transparency.
well, if the image you have is 32x32 or less(some icon editors allow 48x48) you can make it into an icon with a transparent background.. then use an image control to display it...
Thanks denniswrenn! It worked! :cool: