DirectDraw or Direct3D RM
I know what you mean. You want to Alpha-Blend.
Use directdraw to ALPHA-BLEND with black.
Or use Direct3D RM, put your graphic on a plain always visible, and then use the alpha-blend techniques found there.
I can't give you what you need, but if you want to make a powerful application, I suggest DarkBasic.
www.darkbasic.com
-or-
www.darkbasic.co.uk
Download the trial version. This program is very good. It has DirectDraw, 3D, Sound, Music, and Show built in. It takes ten lines to create a 3D cube. Even less, if you want. I suggest you give it a try.
Of course, if you want to use VB and no DirectDraw/3D, then here is the stuff:
Code:
Type RGBIt
OldRed as Integer
OldGrn as Integer
OldBlu as Integer
Red as Integer
Green as Integer
Blue as Integer
End Type
Function Alpha(A as RGBIt,E as RGBIt,AmtSrc as Integer) as RGBIt
Dim B,C,D
B = ((A.Red * AmtSrc) + (E.Red * 255-AmtSrc)) / 255
C = ((A.Blue * AmtSrc) + (E.Blue * 255-AmtSrc)) / 255
D = ((A.Green * AmtSrc) + (E.Green * 255-AmtSrc)) / 255
Alpha.OldRed = A.Red
Alpha.OldGrn = A.Green
Alpha.OldBlu = A.Blue
Alpha.Red = B
Alpha.Green = D
Alpha.Blue = C
End Function
'usage:
'Timer Intervals should be 20 for fast fade, 50 for medium, 100 for slow
K.Red=0
K.Green=0
K.Blue=255
A.Red=255
A.Green=0
A.Blue=0
B=Alpha(K,B,127)
'should end up as a darkish purple
Also check out http://www.cason.addr.com/!