Hi,
I attached new versions of main1.pas and functions1.pas.
It sort of works now.
I created an instance of ImageList at programstart and kept it alive, only destroying it at prorams end.
I used the overloaded version of FindAllFiles that accepts a TStrings parameter, this way it's much easier to keep track of what is created and where.
Don't call ExtractFilePath on the result of SelectDirectory(), because it will remove the final directory (c:\foo\bar becomes c:\foo) and you'll end up searching the wrong directory.
I exit the CycleImages method if no files are found, you'll need to do the same in CycleBack.
I refactored the functions in functions1.pas to accept parameters (for directory and imagelist), so that the unit does not depend on the main unit of the program.
There are still several issues.
If SetBackGround fails, then a dialog pops up, but the timer is not stopped, so this can lead to several dialogs put over each other, not very nice.
Clicking Set Time in seconds from the popup menu gives me an instant crash.
Bart