Forum > Windows
How to Prevent Screen Saver and Power Monitor on Windows?
carlosnatal:
For a program presentation i need a rotiine that block power monitor and screen saver program. Do can you help me?
Zvoni:
--- Quote from: carlosnatal on February 25, 2025, 12:38:41 pm ---For a program presentation i need a rotiine that block power monitor and screen saver program. Do can you help me?
--- End quote ---
For your program presentation, switch it off in Windows Settings......
Fibonacci:
Try this: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---SetThreadExecutionState(ES_CONTINUOUS or ES_SYSTEM_REQUIRED or ES_DISPLAY_REQUIRED);
Zvoni:
--- Quote from: Fibonacci on February 25, 2025, 12:56:21 pm ---Try this: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---SetThreadExecutionState(ES_CONTINUOUS or ES_SYSTEM_REQUIRED or ES_DISPLAY_REQUIRED);
--- End quote ---
From the link above:
--- Quote ---This function does not stop the screen saver from executing.
--- End quote ---
Remy Lebeau:
Programmatically prevent Windows screensaver from starting
Navigation
[0] Message Index
[#] Next page