Fade Transition Using Picture Box 
Author Message
 Fade Transition Using Picture Box

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.



Fri, 12 Apr 2002 03:00:00 GMT  
 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.



Fri, 12 Apr 2002 03:00:00 GMT  
 Fade Transition Using Picture Box
The VB How To series had it in the VB4 edition. Probably carried it forward
to the VB5/6 editions. It involves creating a "merged" palette and changing
the  colors from one picture to the other. Works, too.
--
Gary, MCT, MCP, MCSD
home site http://www.enter.net/~garyl


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.



Sat, 13 Apr 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. butt-ugly page transition using dxtransform.fade ?

2. Applying filter.transition.fade

3. Fades-wipes-transitions?

4. Fading a picture box

5. Fading a Picture Box -- help!!

6. fading of two pictures (blend one picture into the other)

7. Saving picture from a picture box using screen capturing

8. Using a picture box picture as the mouse icon

9. transitions with pictures

10. Transition FX for pictures?

11. Transition effect for pictures

 

 
Powered by phpBB® Forum Software