MSDN Library

MobileDevice.Hibernate Event

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Provides access to the WM_HIBERNATE message in Windows CE.

Namespace:  Microsoft.WindowsCE.Forms
Assembly:  Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)

public static event EventHandler Hibernate

When memory pressure from running applications is intensive, Windows CE sends the WM_HIBERNATE message to top level windows. You can respond to this event in managed code with the Hibernate event.

You can provide code in an event handler to reduce resource usage to accommodate memory pressure from other applications running on the device. This event is specific only to the current thread.

The following code example shows how to add and use an event handler for the Hibernate event.


// Connect an event hander, OnHibernate, to the Hibernate event.
MobileDevice.Hibernate += new EventHandler(OnHibernate);



private void OnHibernate(object sender, EventArgs e)
{
   // Add code here to release cached resources
   // for relieving memory pressure.

}


Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Compact Framework

Supported in: 3.5, 2.0
Show:
© 2016 Microsoft