English
========================================================================
How to get the power mode change like sleep or resume. We can use the Windows's power changed event to solve this problem.
1. Insert the code as below in your application.
2. Run the application and sleep and resume. We can get the power changed event.
中文
========================================================================
如何抓取從電腦從 Sleep 狀態回復或進入 Sleep 狀態,僅需要抓取以下的事件,即可完成。
1. Windows 內建了 power 狀態改變的事件,只需增加以下的程式碼
2. 程式執行了睡眠與從睡眠中喚醒,範例的執行結果如下:




沒有留言:
張貼留言