I made a program that selects a random picture from a directory and sets it to the desktop wallpaper.
The program runs by reading the directory and making a list of the files then choses a random file and renames it to current.jpg which is the filename I am using for my desktop. Works great but I have to click refresh everytime it runs to see the new wallpaper. Is there anyway to tell windows to refresh the wallpaper, or maybe a better way to do this alltogether?