Restore the position of the windows after the screen was turned off due to inactivity - windows

I have 3 monitors and I have set Windows to turn off my screen when the computer is idle after 5 minutes because. After the computer wakes up all of my windows lose their positions and I need to move again each window to the position I want in each monitor, this is a tedious activity.
Is there any way or configuration to avoid this behavior in Windows?
I'm using Windows 10.

Related

Monitors refuse to wake up after display sleep settings

Good Morning
Hoping someone has some experience with this, when the power settings are set to set the monitors to go to sleep after x number of minutes, the monitors then refuse to wake back up. On laptops, this also stops the display on the laptop when opening the lid.
No amount of button presses or combination of buttons wakes the monitors up and has to be hard powered.
At the moment we have had to set VIDEOLOCK and VIDEOCONLOCK to ridiculous timeout settings to stop people losing their work when going on breaks etc but at a loss as to what is causing the displays to drop out completely - PCI Express power saving has also been turned off but made no impact.
Changed power settings and registries through Group Policies and through powercfg but nothing seems to stop the monitors from dropping out after the display goes to sleep.

Detect end of Windows display resolution change

I am trying to develop a background utility for Windows with the following features :
store position of open application windows for the current display resolution Rx
scan for any change in display resolution Rx -> Ry (e.g. related to docking/undocking my laptop to/from its docking station)
wait for Windows to finish automatic repositioning of the windows (messy desktop reconfiguration; see below)
restore the previously stored windows position for the display resolution Ry
I have successfully implemented features 1, 2 and 4. For feature 2, I intercept the WM_DISPLAYCHANGE event, telling me that a change in display resolution has occurred.
Immediately after the resolution change occurs, Windows automatically repositions many (if not all) windows to meet the new display constraints. This phase (which I call the messy desktop reconfiguration) lasts several seconds and causes a real mess in the windows layout (which is why I want to develop the said utility).
Now I have the following problem:
I can only apply feature 4 when Windows has finished the messy desktop reconfiguration phase (3). However, I have not found any acceptable way to detect when this phase ends.
I did try to observe the automatic repositioning of windows by intercepting the EVENT_OBJECT_LOCATIONCHANGE event, and then wait for the last one to be issued. It almost works: I am well notified when it happens, however, I'm not satisfied because the time interval between each of these events can last up to 5 seconds (or maybe more), which makes it difficult to identify the last of these events by a classic timeout method. Currently, I have set this timeout to 10 seconds, which is not satisfactory because I would like to be able to detect the end of the messy desktop reconfiguration earlier and, more importantly, there is no guarantee that another of these events will not occur after the timeout.
Does anyone have a solution to properly detect the end of automatic windows repositonning, when changing the display resolution ?

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?

How can I programmatically attach/detach displays in Windows 10?

I'm wondering if there's a good way to automate changing my display configuration in Windows 10?
I have 3 monitors attached, and I find myself wanting to configure my system in one of 3 ways:
All monitors set up to extend the desktop.
Only my central (largest) monitor enabled, others both disabled.
Only my right-most monitor enabled, others both disabled (I think hook up a spare HDMI cable on my center monitor to my laptop, and the monitor automatically switches to that input).
Manually, this involves opening the Display Settings panel, selecting the monitors, and either marking them as "Disconnected" or "Extend desktop on this display".
Is there some nice, scripting-friendly way to do this? I'm more comfortable doing this sorta thing on Linux, where I'd whip up a quick shell script to call the xrandr command a few times, or something like that...

Make screensaver fire whenever computer locks?

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.

Resources