UtilPowerSendAwakeSignal Method
Sends an Awake signal to prevent the system from turning off the display and entering into Sleep or Hibernation modes.
Namespace: DevCase.Core.IO.Devices.PowerAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static bool SendAwakeSignal()
Public Shared Function SendAwakeSignal As Boolean
Dim returnValue As Boolean
returnValue = UtilPower.SendAwakeSignal()
public:
static bool SendAwakeSignal()
static member SendAwakeSignal : unit -> bool
No code example is currently available or this language may not be supported.
Return Value
Boolean if operation succeeds,
otherwise.
The Awake signal should be sent periodically.
This is a code example that keeps the operating system active to avoid entering into IDLE state.
No code example is currently available or this language may not be supported.
Public Class Form1 : Inherits Form
Private WithEvents awakeTimer As Threading.Timer
Private ReadOnly awakeInterval As Integer = 30000 'ms
Public Sub New()
Me.InitializeComponent()
Me.awakeTimer = New Threading.Timer(AddressOf Me.AwakeTimer_Callback, Nothing, Me.awakeInterval, 0)
End Sub
Private Sub AwakeTimer_Callback(ByVal stateInfo As Object)
' Send periodically an Awake signal to avoid the system entering into Sleep or Hibernation mode.
PowerUtil.SendAwakeSignal()
If (Me.awakeTimer IsNot Nothing) Then
Me.awakeTimer.Change(Me.awakeInterval, 0)
End If
End Sub
Private Sub Form1_FormClosing(sender As Object, e As FormClosingEventArgs) _
Handles MyBase.FormClosing
Me.awakeTimer.Dispose()
Me.awakeTimer = Nothing
PowerUtil.RemovedAwakeSignal()
End Sub
End Class
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.