
Fade Transition Using Picture Box
Hi,
I think this should work, set the picturebox using RGB at 255 for all
values (white)
Add a timer to your form and in the timer event use something like
Dim J%, J&
For J = 255 To 0 Step - 1
For I = 1 To 100000
Next
Picture.backcolor = RGB(J,J,J)
Next
timer.enabled = False
Should work, I'm not in VB now. You should also use a Pause function instead
of an inner loop. Using NOW, or Sleep or whatever, I'm just too lazy to
head-code it now.
Just set your timer enabled property to false at load , then enable it from
where you need to in code.
Quote:
> I am attempting to fade from one image to another in a picture box. The
fade
> could take the form of a fade to black, transparent fade, etc.
> The images are loaded using a timer as follows:
> If seconds1 = 1 Then Set Picture1.Picture = LoadPicture(App.Path &
> "/img/team1.jpg")
> If seconds1 = 10 Then Set Picture1.Picture = LoadPicture(App.Path &
> "/img/team2.jpg")
> ...this simply replaces one image with the next. Not very interesting.
> I've spent a lot of time looking around and havn't found very much that
> directly addresses this task.