Sleepmodus PC and timerevents.

This forum is for eXpress++ general support.
Post Reply
Message
Author
skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Sleepmodus PC and timerevents.

#1 Post by skiman »

Hi,

In our application we have some timers to do different kind of calculations.

When a user don't close our application and the PC comes into sleep modus after some hours this can cause an error.

The timerevent is starting a function which tries to open a dbf file. Because of the sleepmodus of the PC an error returns. In the morning the user hits a key on his keyboard and sees the error.

I can solve this with 'Begin Sequence...' but I was wondering if there is a way to detect if a PC is in sleepmodus? Or if you can 'awake' the PC?
Best regards,

Chris.
www.aboservice.be

User avatar
Auge_Ohr
Posts: 1406
Joined: Wed Feb 24, 2010 3:44 pm

Re: Sleepmodus PC and timerevents.

#2 Post by Auge_Ohr »

hi Chris,

have you try

Code: Select all

   oDlg:systemPowerStatus := {| nChange, uNIL, oSelf | NoDown(nChange, oSelf) }
   
FUNCTION NoDown(nChange, oSelf)
   TONE(1234)
RETURN XPP_POWERQUERY_DENY   
greetings by OHR
Jimmy

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Sleepmodus PC and timerevents.

#3 Post by skiman »

Hi Jimmy,

Thanks for the answer. I will see if that can solve the problem. Seems as there comes some kind of notification when the system want to go down.

According to the note in the doc it is not always possible to DENY this process. Seems as the documentation is last updated when Vista was the main OS...
Best regards,

Chris.
www.aboservice.be

Post Reply