HighTechTalks DotNet Forums  

Q: WM_HIBERNATE

Dotnet Framework (Compact Framework) microsoft.public.dotnet.framework.compactframework


Discuss Q: WM_HIBERNATE in the Dotnet Framework (Compact Framework) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Martin
 
Posts: n/a

Default Q: WM_HIBERNATE - 10-15-2007 , 04:32 PM






Hi!

I am writing my very first Application for a Cell phone.

I am also struggeling to write it so it meets Microsofts demand for a "True"
Mobile application.

I need to hook the WM_HIBERNATE message, and i just cant figure out how.

I cant find it in the compact framework. Do i have to import it from a DLL?

Any suggestions, links would be greatly appreciated.

Regards
Martin


Reply With Quote
  #2  
Old   
 
Posts: n/a

Default Re: WM_HIBERNATE - 10-15-2007 , 04:46 PM






Why do you feel you need to hook this message? For most cases, the CF
itself will handle this by calling GC.Collect when it sees the message.
It's not "imported" from anywhere. It's simply a defined constant that can
be found in the SDK headers (probably winuser.h if I were to guess).


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com

"Martin" <makungsbacka (AT) hotmail (DOT) com> wrote

Quote:
Hi!

I am writing my very first Application for a Cell phone.

I am also struggeling to write it so it meets Microsofts demand for a
"True" Mobile application.

I need to hook the WM_HIBERNATE message, and i just cant figure out how.

I cant find it in the compact framework. Do i have to import it from a
DLL?

Any suggestions, links would be greatly appreciated.

Regards
Martin



Reply With Quote
  #3  
Old   
Christian Resma Helle
 
Posts: n/a

Default Re: WM_HIBERNATE - 10-16-2007 , 04:39 AM



You can also catch the WM_HIBERNATE event through the
Microsoft.WindowsCE.Forms.MobileDevice class

Here's a short sample:

static void Main() {
Microsoft.WindowsCE.Forms.MobileDevice.Hibernate += new
EventHandler(MobileDevice_Hibernate);
Application.Run(new Form1());
}

static void MobileDevice_Hibernate(object sender, EventArgs e) {
// Do your stuff...
}


"<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote

Quote:
Why do you feel you need to hook this message? For most cases, the CF
itself will handle this by calling GC.Collect when it sees the message.
It's not "imported" from anywhere. It's simply a defined constant that
can be found in the SDK headers (probably winuser.h if I were to guess).


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com

"Martin" <makungsbacka (AT) hotmail (DOT) com> wrote in message
news:C1FFA714-A780-4D2F-A42D-FD4FB8ADA57B (AT) microsoft (DOT) com...
Hi!

I am writing my very first Application for a Cell phone.

I am also struggeling to write it so it meets Microsofts demand for a
"True" Mobile application.

I need to hook the WM_HIBERNATE message, and i just cant figure out how.

I cant find it in the compact framework. Do i have to import it from a
DLL?

Any suggestions, links would be greatly appreciated.

Regards
Martin





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.