我怎么能知道当Windows进入/退出睡眠或休眠模式? [英] How can I know when Windows is going into/out of sleep or Hibernate mode?

查看:221
本文介绍了我怎么能知道当Windows进入/退出睡眠或休眠模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以订阅一个Windows事件时将触发Windows正在进入或退出休眠或休眠状态?

Is it possible to subscribe to a Windows event that fires when Windows is going into or coming out of Sleep or Hibernate state?

我需要我的应用程序进行当电脑进入睡眠状态做一些清理工作,避免时序问题出来时,睡眠意识。

I need my application to be made aware when the computer is going to sleep to do some cleanup and avoid timing issues when it comes out of sleep.

推荐答案

<一个href=\"http://msdn.microsoft.com/en-us/library/microsoft.win32.systemevents.powermodechanged.aspx\"><$c$c>Microsoft.Win32.SystemEvents.PowerModeChanged事件将会给你这些信息。本次活动是由微软至今。

Microsoft.Win32.SystemEvents.PowerModeChanged event will give you this information. This event is available in all variants of the .NET framework released by Microsoft so far.

这篇关于我怎么能知道当Windows进入/退出睡眠或休眠模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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