Results 1 to 7 of 7

Thread: Very simple slide show with cross-fading

Threaded View

  1. #1

    Thread Starter
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Very simple slide show with cross-fading

    Just click the button, select any folder with pictures in it and watch. It's a smooth running slide show that leaves your main form to get on with its own business. It works by using two extra forms to show alternate images, and changing the opacity of the top one to do cross fading. Using extra forms maybe sounds a bit clunky, but making them into Owned forms takes away all the nastiness.

    To set it up, make a form and give it a button, a panel and a trackbar. If I haven't forgotten anything, all the non-default properties and other controls are set in the code. Otherwise, just copy the picture below.

    There's just over 100 lines of code, and half of those are layout stuff. The only purpose of the panel is to mark the position for the two Owned forms. Their bounds stay the same as those of the panel when you move or resize the form. At the moment the program reads JPG, PNG and BMP files but you could easily add GIFs too (see the code to see how it's done).

    I gave the main form a gradient background to make it look a bit more interesting when there's no picture. Apart from that, the design is nothing fancy. I hope you like it and can use some of the ideas in it. Criticism is also welcome. (Is using more than 1 form really evil?)

    BB
    Attached Images Attached Images  
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width