0

I'm using Windows 10 Home Edition and Delphi xe8. I made a program that paints on desktop wallpaper and behind the icons. I've tried many API functions to inform the slideshow app not to interfere with my program.

Whatever I do, it doesn't notify slideshow - except setting wallpaper. If I set the wallpaper, I can not reset it back to slideshow programmatically.

I basically want to suspend the slideshow while my program runs. After quitting the program, slideshow should be resumed. I thought that if I set the "Interval" period long enough, then change it back to normal (when quitting my program) it would be enough. I change registry settings (setting interval from 1 min. to 1 day, and vice versa) but slideshow doesn't know about it. I've tried :

  1. SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, nil, SPIF_SENDWININICHANGE or SPIF_SENDCHANGE);

  2. SHChangeNotify (SHCNE_ASSOCCHANGED, 0, nil, nil);

But none informs slideshow.

zero323
  • 322,348
  • 103
  • 959
  • 935
mr_tio
  • 1
  • 1
  • "I change registry settings (setting interval from 1 min. to 1 day, and viceversa) but slideshow doesn't know about it." Well I would imagine so. Changing registry values is only half of the story. The actual app responsible for the slideshow (Windows Explorer?) needs to re-read these registry settings. I assume it already has those settings cached, so that it doesn't need to keep reading from the registry. – Jerry Dodge Jan 27 '18 at 18:33
  • [IDesktopWallpaper::SetSlideshowOptions](https://msdn.microsoft.com/en-us/library/windows/desktop/hh706961(v=vs.85).aspx) – J... Jan 27 '18 at 20:01
  • ...and to answer your next question : [How to import IDL into Delphi?](https://stackoverflow.com/q/27822452/327083) – J... Jan 27 '18 at 20:02
  • I hope you write a good uninstall program – David Heffernan Jan 27 '18 at 21:13
  • Thank you J... I am looking for interfaces, but can not find where idesktopwallpaper interface class is defined. Win10-sdk seems to have it, 2.7GB is a bit huge to download. Anyway, thank you again. – mr_tio Jan 28 '18 at 08:03

0 Answers0