Check if PC is in sleep mode

ello frnds,i want to check if the computer is in sleep mode or not...Suppose my project is in normal state..I change the state to sleep mode,I want that now when the computer wakes from sleep mode,I want that my project is in minimized state..How to check dat?

Imports Microsoft.Win32

Public Class Form1
Public Sub New()

AddHandler SystemEvents.PowerModeChanged, _
AddressOf SystemEvents_PowerModeChanged

End Sub

Private Sub SystemEvents_PowerModeChanged( _
ByVal sender As Object, _
ByVal e As PowerModeChangedEventArgs)
End Sub

End Class

BUt event SystemEvents_PowerModeChange is not fire when i change the mode..can somebody help me?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!