Click to See Complete Forum and Search --> : "Transparent Picture Control?"
jramirez
Mar 28th, 2001, 09:52 AM
Is there any way to use a Picture Control so that the image (say, a sphere) is the only thing you see? In other words, don't show the borders of the control or its background? I know this can be done easilly using a transparent GIF image in an Image control but I need to use a Picture Control for 2 reasons.
1. Ability to use Circle, Line, etc, methods on it.
2. Picture Control can act as a container for other controls, while an image control can't.
Any suggestions?
Sastraxi
Mar 28th, 2001, 03:53 PM
You could use BitBlt, but I think this will destroy the use of the line and shape methods:
http://vbden.tripod.com/articles/invmask.htm
Just use SrcAND for the mask (white where transparent, black where opaque) and SrcPAINT for the sprite (white in mask is black in this picture, and black in sprite is whatever)
Use the LineTO and APIs like that, I think it might work..
jramirez
Mar 28th, 2001, 03:56 PM
That's the problem. Can't use BitBlt, because I need to use the Circle Method (Actually, Arcs depicting player healths where the end of the arc, in case of 100% health, actually complete's the circle. As the percentage goes down, the gap between the beginning and end of the arc gets bigger. Drawing images for each percentile would be a pain....)
Sastraxi
Mar 28th, 2001, 04:03 PM
Someone posted a similar Q, was that you? I dunno, I just posted on it, so go see one with a similar name.
You could also use the TransparentBlt function.
Blt, Then draw the Arc. The arc will be on top.
Z.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.