Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can a screensaver continue to draw over the desktop in Windows 8?

I’m developing a screen saver in C# .NET4.0 on VS2010 which needs to do a fair bit of processing before it actually shows screens (fairly complex database access). This is fine because the user is unaware that this processing is going on and then the full screen forms kick in when everything is ready. That is, unless we are running on Windows 8.

Searching on the Microsoft Community (http://answers.microsoft.com/en-us/windows/forum/windows_8-desktop/bubbles-screensaver-has-black-background/e0807324-5ca6-4abe-b6ba-716848b41ff5?page=4) reveals that a design change was made in Windows 8 that prevents screensavers from drawing over an image of the desktop. Any screensaver that previously drew over the desktop will instead draw over a plain background using your chosen “metro” background colour. Experimenting reveals that this background kicks in immediately the .scr file launches i.e. before any forms can be displayed. Hence tricks like displaying forms minimised or with 0% opacity don’t work because this simply reveals the plain background underneath.

The best I’ve been able to come up with is to display full screen plain black forms as first action when my code starts i.e. before any database processing or other screen construction takes place. Why try to replace a plain screen with another plain screen? Well, because the default Windows background colour seems to be blue. That’s blue as in BSOD blue which looks kind of alarming when it kicks in. So the best I can do for a Windows 8 user experience is a quick flicker of blue followed by 3-4 seconds of plain black before screens are populated with something meaningful. This new behaviour from Microsoft is apparently “by design”. The fact that it doesn’t manifest itself in Preview mode is apparently an error which one supposes MS will tidy up later.

So my question is does anyone know any way around this so that I can continue to have the desktop showing until screensaver forms are ready to kick in?

like image 645
ifinlay Avatar asked Dec 03 '25 11:12

ifinlay


2 Answers

I struggled quite a lot with a similar problem regarding this awkward design decision in win8. I the end had to compromise but my search continues for a a bullet proof solution, when I have time.

Now what I ended up with is running a batch file after the monitoring system starts and have thread detect idle time and run that batch again.

@start /wait Bubbles.scr /s & rundll32 user32.dll,LockWorkStation

What this does is:

  • starts screensaver preview in fullscreen (this works in win8) and waits
  • on user action lock screen is show and user prompted for password

As I said it's a compromise until a find something better. Hope it helps

like image 178
Capp Argo Avatar answered Dec 05 '25 02:12

Capp Argo


Updated to win10; try to use that cool scr and found same issue;

Try to trick ms restriction and found only one very long solution:

  • enable logging of screensaver invoked events;

here instruction via gpedit: https://superuser.com/questions/538146/run-a-batch-cmd-upon-screensaver

  • now you will able to start other comand or app when screensaver starting;

  • goto C:\Windows\System32

  • copy Bubbles.scr and rename to Bubbles.exe

  • then config task to run C:\Windows\System32\Bubbles.exe with argument /s (administration->taskcheduler)

  • use some windows screensaver and config to use 1 min or more; (or use 'runsarver' with empty options from upper link or create your own empty.exe and rename to .scr and install with right menu, etc)

Found cool app to customize hidden screensaver features: http://winaero.com/download.php?view.8

(work with small bugs but work as needed under win10)

All work fine one cons checkbox to lock PC must be unchecked;

If needed create own app to run Bubbles and on exit lock PC or bat file as above, etc;

hope people will have fun with my solution :)

like image 29
user1005462 Avatar answered Dec 05 '25 02:12

user1005462



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!