screensaver

Need to disable the screen saver / screen locking in Windows C#/.Net [closed]

时光毁灭记忆、已成空白 提交于 2019-11-28 05:52:49
For a particular application, I need the screen saver to be disabled while it's running. The operator COULD manually turn it off, and then back on later, but the easiest thing to do would be to just keep the screen saver at bay while the application is running. How do I do this? I've found code for actually turning off the screen saver with SPI_SETSCREENSAVEACTIVE, but I don't think that's what I want. Serafeim theoldnewthing has your answer: Use SetThreadExecutionState(ES_DISPLAY_REQUIRED) . This is used by video players and PowerPoint. Ohad Schneider [FlagsAttribute] public enum EXECUTION

How to determine if a screensaver is running in Java?

本秂侑毒 提交于 2019-11-27 15:56:15
My Application periodicly shows information on the screen. But if the screenshot is active, the application should wait until the user returns. Is there any way to determine if the screensaver is running? I don't need a clean solution, u just needs to work on windows xp. Similar question, but other technology: How to determine that a screensaver is running? Try using the JNA library to invoke the SystemParametersInfo system call. The following example uses code from the win32 examples provided by JNA: public class JNATest { public static void main(String[] args) { W32API.UINT_PTR uiAction =

Programmatically prevent Windows screensaver from starting

点点圈 提交于 2019-11-27 12:44:11
Is there a recommended way to prevent the Windows screensaver from starting? The closest thing I've found is this article , but what I would really like to do is just tell Windows that the computer isn't idle rather than fooling with the currently set screensaver values. For testing, I set the screensaver to 1 minute and required a password. I tried capturing SC_SCREENSAVE and returning -1 in VB .Net. As commented, it works when there is no screensaver password but fails if the screensaver password is active. (I tried it in Windows XP). I also put this into a Timer's tick event, every 1000

javascript code to prevent screensaver from starting

心不动则不痛 提交于 2019-11-27 07:45:33
问题 I am completely new to javascript programming and I have a question that I didn't manage to find an answer for anywhere. I have recently put together a simple slideshow to view the photos remotely that I host on my home computer. This by itself works fine. The problem I run into is that when I'm viewing photos I don't interact with the hardware, which after some time causes the monitor to switch off. This is particularly annoying when watching photos on my mobile phone. My question is: is

Launch System Screensaver from C# Windows Form

旧时模样 提交于 2019-11-27 06:11:13
问题 Hopefully this is a simple one, but can anyone provide some simple c# code that will launch the currently configured screensaver? 回答1: Here is a good site showing how to work with all aspects of the screensaver. See the comments at the end for the code to start the screensaver. http://www.codeproject.com/KB/cs/ScreenSaverControl.aspx [DllImport("user32.dll", EntryPoint = "GetDesktopWindow")] private static extern IntPtr GetDesktopWindow(); [DllImport("user32.dll")] private static extern

Programmatically prevent Windows screensaver from starting

情到浓时终转凉″ 提交于 2019-11-27 04:04:34
问题 Is there a recommended way to prevent the Windows screensaver from starting? The closest thing I've found is this article, but what I would really like to do is just tell Windows that the computer isn't idle rather than fooling with the currently set screensaver values. 回答1: For testing, I set the screensaver to 1 minute and required a password. I tried capturing SC_SCREENSAVE and returning -1 in VB .Net. As commented, it works when there is no screensaver password but fails if the

Need to disable the screen saver / screen locking in Windows C#/.Net [closed]

吃可爱长大的小学妹 提交于 2019-11-27 01:11:32
问题 For a particular application, I need the screen saver to be disabled while it's running. The operator COULD manually turn it off, and then back on later, but the easiest thing to do would be to just keep the screen saver at bay while the application is running. How do I do this? I've found code for actually turning off the screen saver with SPI_SETSCREENSAVEACTIVE, but I don't think that's what I want. 回答1: theoldnewthing has your answer: Use SetThreadExecutionState(ES_DISPLAY_REQUIRED). This

Disabling Screen Saver and Power Options in C#

孤者浪人 提交于 2019-11-26 16:28:57
问题 I am writing an application in C# that plays a movie. I need to figure out how to disable the screen saver and power options using C#. I know the Windows SDK API has a function called SetThreadExecutionState() which can be used to do this, however, I do not know if there is a better way to do it. If not, how do I incorporate this function into C#? 回答1: Not sure if there is a better .NET solution but here is how you could use that API: The required usings: using System.Runtime.InteropServices;