中断活动的屏幕保护程序编程? [英] Interrupt an active screensaver programatically?

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

问题描述

原因: 我的工作需要显示在桌面上信息的紧急警报应用程序。当客户端收到警报后,它会弹出一个窗口。如果屏幕保护程序处于激活状态或显示器处于待机警报将不可见。我不知道是否有可能通过某种程序上的鼠标移动或系统调用来唤醒计算机,使警报将是可见的。我想原因鼠标移动或按键preSS唤醒它是因为中断,因此可能无法硬件。

REASON: I'm working on an emergency alert application that needs to display information on a desktop. When the client receives an alert, it pops up a window. If a screensaver is active or the monitor is in standby the alert will not be visible. I'm wondering if it's possible to wake the computer up via some sort of programatic mouse move or system call so that the alert would be visible. I think the reason a mouse move or keypress wakes it up is because of a hardware interrupt so it may not be possible.

目前,该项目正在用C#实现。 我很感兴趣地听到有关Windows,Mac和Linux解决方案。

Currently, the project is being implemented in C#. I'm interested to hear about solutions for Windows, MAC, and Linux.

这是一个客户的要求。我已经考虑了以下内容:

This is a customer request. I have considered the following:

  • 在活动之后大多数的计算机用户必须登录。这些计算机不会得到警报
  • 有一个很好的机会,如果屏幕处于活动状态,那么没有人是在电脑反正。

我并不是想:

  • prevent屏幕保护程序或节能模式中一起启动。

推荐答案

建立在什么fbonnet说,使用了的 KB 文章在C#中 pinvoke.net 网站是一个很好的资源。他们还对 PostMessage的函数的这里

Building on what fbonnet said, to use the functions shown in the kb article in C# the pinvoke.net site is a great resource. They also have a article on the PostMessage function here.

所以,让你的code工作的基本途径可能是搜索的 KB列出的功能< /在 pinvoke.net 网站>的文章。 或你可以阅读这篇文章已经做了你

So the basic way of getting your code working could be searching the functions listed in the kb article on the pinvoke.net site. Or you can read this article has done that for you.

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

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