禁用屏幕保护程序的用户 [英] disabling screen saver to user

查看:155
本文介绍了禁用屏幕保护程序的用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要禁用屏幕保护程序给其他用户。如何可以做到?

I want to disable a screen saver to another user. How it can be done?

我有管理权限。我不能由屏幕保护程序被中断的应用程序。

I have administrative privileges. I have an application that can't be interrupted by the screen saver.

推荐答案

如果你正在写的应用程序你自己,看看调用非托管API SetThreadExecutionState(的 PInvoke的参考)。从我的答案复制到<一个href="http://stackoverflow.com/questions/3665332/how-do-i-$p$pvent-screen-savers-and-sleeps-during-my-program-execution">how我是否prevent屏幕保护程序和我的程序执行过程中睡觉:

If you're writing the application yourself, look into calling the unmanaged API SetThreadExecutionState (PInvoke reference). Copying from my answer to how do i prevent screen-savers and sleeps during my program execution?:

不要乱用屏幕保护程序设置,使用 SetThreadExecutionState 。这是一个事实,即你的应用程序是活动的通知窗口的API:

Don't mess with the screensaver settings, use SetThreadExecutionState. This is the API for informing windows on the fact that your application is active:

允许应用程序通知   系统,它是在使用,从而   $ P $进入pventing系统   睡眠或关闭显示器时   在应用程序运行。

Enables an application to inform the system that it is in use, thereby preventing the system from entering sleep or turning off the display while the application is running.

多媒体应用,如视频   球员和presentation应用,   必须当他们使用ES_DISPLAY_REQUIRED   对于长时间显示视频   无需用户输入

Multimedia applications, such as video players and presentation applications, must use ES_DISPLAY_REQUIRED when they display video for long periods of time without user input

如果您的的有超过应用控制,但是金丹踢原因问题的画面,然后这些信息推回给开发者。

If you don't have control over the application, but the screen saver kicking in causes problems, then push this information back to the developers.

禁用屏幕保护程序的总是的错误的解决问题的方法,因为它会影响用户的整个体验,应用程序运行不只是当。

Disabling the screensaver is almost always the wrong solution to the problem, since it affects the users whole experience, not just when the application is running.

这篇关于禁用屏幕保护程序的用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆