BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

detecting when a laptop is suspending and resuming

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi WinAPI
View previous topic :: View next topic  
Author Message
RichardM
Guest





PostPosted: Sun Oct 10, 2004 5:35 pm    Post subject: detecting when a laptop is suspending and resuming Reply with quote



Could anyone point me in the direction of where to find info about
trapping the events that my app would be given when a laptop goes into
suspend or resume?

I am already trapping something (anything) on WM_POWERBROADCAST when
the laptop goes into suspend, but I am not sure how to work out when
it's resumed again?

Thanks in advance

Richard
Back to top
Woody/mCSSPA
Guest





PostPosted: Wed Oct 13, 2004 2:13 pm    Post subject: Re: detecting when a laptop is suspending and resuming Reply with quote



hi richard,

you're on the right way. look up WM_POWERBROADCAST in the win32
developer's references (included with delphi); there you can find the
parameter values (espc. PBT_APMSUSPEND / PBT_APMRESUMESUSPEND) that you
have to catch when writing a message handler.
furthermore, looking up the delphi help for TApplication.OnMessage might
be useful if you want to use an alternative to the "message <MSG_ID>;"
directive.

regards, Woody/mC


RichardM wrote:

Quote:
Could anyone point me in the direction of where to find info about
trapping the events that my app would be given when a laptop goes into
suspend or resume?

I am already trapping something (anything) on WM_POWERBROADCAST when
the laptop goes into suspend, but I am not sure how to work out when
it's resumed again?

Thanks in advance

Richard



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi WinAPI All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.