I'd like to change the current Screensaver for a custom one (which I previously loaded as a resource in Visual Studio) using C#. How could that be done? I've looked for it on Google and SO, but it all talks about "How to create a Screensaver", not "How to change a Screensaver". If possible, it should work on WinXP, Vista and 7.
How do I change the screensaver programmatically?
5.6k Views Asked by Sergi Juanola At
2
I'll answer my question with the piece of code that worked to me:
Then, when calling it from my application:
I read somewhere I should write a name no longer than 8 characters (a bit weird, but XP is all like this), so my screensaver is called
svr1.scr
(not really object oriented, but does the trick)