PDA

Click to See Complete Forum and Search --> : Fading a bitmap into the background?


Athenis
Nov 15th, 1999, 12:05 PM
Hi,
How do I fade a picture into the background.. like what happens in the Sonique control console?
Thanks.

paolo
Nov 15th, 1999, 08:27 PM
You can try using this code in your form1.paint event:

Set bmp = LoadPicture("e:\mypicture.bmp")
fx = Form1.ScaleHeight
fy = Form1.ScaleWidth
bx = bmp.Width
By = bmp.Height
xvolte = fx / bx + IIf(fx / bx <> 0, 1, 0)
yvolte = fy / By + IIf(fy / By <> 0, 1, 0)
For y = 0 To yvolte
For x = 0 To xvolte
Form1.PaintPicture bmp, x * bx, y * By, bx, By
Next
Next

This function will paint a bitmap into the background of your application, and if the bitmap is smaller than the form it will reproduce it more times ( like the background of many web pages).
I hope this can help you.