|
-
Sep 18th, 2000, 06:18 PM
#1
Thread Starter
Frenzied Member
if it possible to open a transparent GIF in VB so like if I load the gif into a picture box, then put the picture box over a command button, it would show the picture box, and the back ground of the gif would show the command button (I'm using Microsoft Photo Editor to make the back ground transparent)
NXSupport - Your one-stop source for computer help
-
Sep 18th, 2000, 06:22 PM
#2
Set the command button's style to 1-Graphical and you can use pictures.
-
Sep 18th, 2000, 06:22 PM
#3
If you're placing it in a PictureBox then the background will not be transparent, however it will be if you use an Image instead.
-
Sep 18th, 2000, 06:24 PM
#4
Thread Starter
Frenzied Member
matt, thats not what I meant
Megatron: thanks, now is there I way that I can get the image to go ontop of the command button?
NXSupport - Your one-stop source for computer help
-
Sep 18th, 2000, 07:05 PM
#5
Hyperactive Member
I've mentioned this somewhere else before but here goes again.
When you load a GIF into an Image control it implicitly converts it to the BMP format.
If your GIF had a transparent background then as part of the conversion it will also set the MaskColor to be the same as your transparent colour in the GIF and thus maintain transparency.
You do have to take a few considerations into account though.
Firstly you can only load it into controls that support Transparent backgrounds by nature (ie have a Background or similar attribute selecting 0-Opaque, 1-Transparent).
Secondly If you then copy or duplicate this image from where you FIRST loaded it into any other control, imagelist or ANYTHING else then you have lost the transparent background unless you manually set the MaskColor in the place where you copied it to.
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
|