PDA

Click to See Complete Forum and Search --> : Alphablending


Xero
May 29th, 2000, 03:19 AM
I need a fast way to draw a picture in a picturebox with a level of transparency really really fast. Because, I'm going to me doing it over and over and each time increasing the transparency so it looks like it fades away. Thanks!

-Xero
Programmer for Arkon Studios

May 29th, 2000, 03:46 AM
Use BitBlt or PaintPicture.

Xero
May 29th, 2000, 03:54 AM
How? I'm... uh... new to this stuff... I know a little bit with BitBlt, but thats about it...

May 30th, 2000, 08:15 AM
Here is an example of PaintPicture

Put this code in a CommandButton. Make sure that there is a PictureBox on the Form with a Picture already loaded. Also, Set the ScaleMode property for everything to Pixel


Private Sub Command1_Click()

' Paint the Picture in Picture1 on the Form and
' shrink it to 32x32
Form1.PaintPicture Picture1.Picture, 0, 0, 32, 32

End Sub

May 30th, 2000, 08:46 PM
Try this page, it shows how to use a dll called "alphablending.dll", it needs windows 98 or NT to work. http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=3213

vbZombie
May 31st, 2000, 01:44 AM
Use Direct3DIM, that has to be the fastest way (if you have a 3d card, that is).

May 31st, 2000, 02:27 AM
How do you use the function? Is it in the Type Library?