Make screensaver fire whenever computer locks? - windows

Is it possible to force the screensaver to appear whenever a computer becomes locked? Specifically on XP, 7 if possible.

Windows has several desktops. You're familiar with the one you are looking at right now. There's another one for the login screen. And there's one for the screen saver. Locking the workstation switches the desktop to the login screen. You cannot switch back to another desktop (like the screen saver one) until you login.
You can however get the screen saver started, that selects the screen saver desktop. Which automatically switches to the login desktop if you configure the screen saver that way.

I believe that the SS is only triggered when the timeout is reached, regardless if the PC is locked or not.
The other way to think of this is to lock the PC whenever the screensaver fired.
Windows 2000 and above has an option to enable lock the PC when the screensaver is active, just enable this, and set the timeout and you are ready to go.

Related

Windows-10-IOT QT-C++/QML App Fullscreen Gui Frozen when monitor turns back on

ISSUE:
On a touch panel with no keyboard, my QT C++/QML app running on Windows 10 IOT has the fullscreen GUI "frozen", when the monitor turns on (after the user has triggered the touchscreen), after it has timed-out earlier and turned off due to power settings. Mouse cursor still updates.
The QML GUI has "flags: Qt.FramelessWindowHint | Qt.Window"; I do not want to add "Qt.WindowStaysOnTopHint" as it will block the control panel window when it is open from the app. The program is verified to be still running, only the GUI has frozen from the point in time when the screen turned off.
TEMPORARY RESOLUTION:
The only way to "unfreeze" the fullscreen GUI is to connect a keyboard & press the Windows key to show-hide the start menu, or do it programmatically with a manual QML button placed at a known position or on detection of monitor WM_POWERBROADCAST messages.
When the app is not fullscreen, the freezing doesn't seem to be happening.
Is this due to some missing WM_MESSAGES (e.g. WM_PAINT, WM_ACTIVATE, etc) sent by the OS to the app when it is fullscreen, or when the start menu button is pressed?
Can the app-fullscreen-freezing on monitor-turn-back-on be rectified by the app programmatically sending a sequence of WM_MESSAGES to itself, but not the Win button keypress (as the normal user is not supposed to access the OS or see anything related to the OS when the app is running)?
I tried using winAPI SetForegroundWindow() function...?
:-( Fast forward a few days...
With further testing, it seems that using SetForegroundWindow() alone is not consistent/reliable. Sometimes it works, sometimes it doesn't.
The most reliable that works 99.999% of the time is still the VK_LWIN keypress sent by the app. But, as mentioned before, the app user is not supposed to see the start-menu appearing then disappearing. Best if the behavior of the VK_LWIN keypress could be duplicated to the app without seeing the start-menu...

Black out the screen during a Windows 10 restart up to a certain point in time

Is there a way to temporarily disable the display during a Windows 10 PC restart?
Background: we have a software, which is set to start up automatically after a PC restart. Upon startup (after Windows has booted) this software starts in a console window and then opens a WPF screen, which is displayed fullscreen and always resides in front of everything else. I would like to black out the screen ideally as early as possible during the Windows startup up to the point in time when our software WPF window is set and ready on the screen. This way the console window (as well as the desktop showing for a short period of time) would be hidden from the user.
In an ideal world I would hide the fact that Windows is running on the PC from the user, but I assume this is not possible over a restart...
Is this possible with the help of registry settings/command line tools/batch file commands or similar?

Screen saver makes error on different desktop window of windows 7

I am suffering from unsecured screen saver in Windows 7. When I turned off "On resume, display logon screen" option and changed ScreenSaverIsSecure from 1 to 0. Adobe flash-based *.scr displays "Code 5: Access is denied." error message on Default desktop even though I am on another desktop window and the screen saver does not start. If ScreenSaverIsSecure is set to 1, the screen saver works regardless of desktop window. This is different from Windows XP.
Another test on this was I set the screen saver to "3D text" and I was on another desktop. "3D text" screen saver has started on Default desktop but it says "Incompatible with Direct3D" error.
Test condition:
OS: Windows 7 x64 Pro SP1
Screen saver timeout: 1min
Screen saver: 3D text
Uncheck "On resume, display logon screen". Need to make sure ScreenSaverIsSecure is 0 (0 means do not ask password on resume)
Registry location: HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Control Panel\Desktop
Desktops.exe included in SysInternal tools.
Test procedures:
- Run Desktops.exe and switch to #2 desktop
- Wait 1min for screen saver and you could not see screen saver on #2 desktop after more than 1min elapsed.
- Switch to #1 desktop (Default) and see "Incompatible with Direct3D" error message instead of 3D text message you defined in Screen Saver setting.
If you have a flash screen saver, you will see "Code 5 error: Access is denied." error message and you need to click to continue. ALT+F4 required to escape from screen saver. Strange...
Anyone who can assist on this?
Thank you in advance.
The symptoms you describe are consistent with a badly coded screensaver. It would appear that the screensaver is attempting to access an inactive desktop. I expect it was written without consideration for the possibility of there being multiple desktops in the interactive session.
There's nothing you can do about it. You can't fix the screensaver since you didn't code it. The obvious workarounds are:
Enable the On resume, display logon screen option.
Stop using multiple desktops.
Choose a different screensaver, one that handles multiple desktops correctly.
Of these the lask option would be my choice.
One final point. I don't see any Flash here. That screensaver uses DirectX to render text.

Autoit anti-idle script after screen lock

I'm trying to make an simple anti-idle script (that moves the mouse or whatever) to prevent an application from stopping.
How can I keep it running after screen lock ?
It seems like this is explained in the Autoit faq :
http://www.autoitscript.com/wiki/FAQ#Why_doesn.27t_my_script_work_on_a_locked_workstation.3F
On locked station any window will never be active (active is only dialog with text "Press Ctrl+Alt+Del") In Windows locked state applications runs hidden (behind that visible dialog) and haven't focus and active status.
So generally don't use Send() MouseClick() WinActivate() WinWaitActive() WinActive() etc.
Instead use ControlSend() ControlSetText() ControlClick() WinWait() WinExists() WinMenuSelectItem() etc. This way you may have your script resistive against another active windows. It's possible to run such script from scheduler on locked Windows station.
You can't automate anything after your screen is locked. User input is simply ignored. A much easier way would be to prevent your screen from locking, for example, by moving the mouse randomly every 30 seconds.

screensaver hurts CUDA performance?

I've noticed that the running times of my CUDA kernels are almost tripled the moment the screensaver kicks in. This happens even if it's the blank screensaver.
Oddly enough, this appears to have nothing to do with the power settings. When I disable the screen saver and let the screen power off, the performance stays the same. When I set the "Turn off monitor" to "Never" and lets the screen saver kick in, it happens.
Why does this happen?
Is there a way to counteract this phenomena?
Is there a way to tell windows not to kick in the screen saver? (How do media players do it?)
I'm working on XP SP2 x64
Firstly, its interesting that CUDA is so impacted.
But here is the recipe in win32 for avoiding the screensaver kicking in:
A normal approach is to send yourself 'fake' key presses occasionally using the SendInput API, to reset the inactivity timer that triggers the screensaver.
It is possible to stop applications doing this, however, using the SPI_SETBLOCKSENDINPUTRESETS parameter for SystemParametersInfo.
Another approach is just to turn the screensaver off programmatically, using SPI_SETSCREENSAVEACTIVE for SystemParametersInfo. However, this is a global setting for the whole user - what if two programs use this overlapping? Try to avoid this!

Resources