Timer event pauzes when application is inactive

G

Guest

Hello

I'm coming across the following problem. I have a application that "pauzes" when the application becomes inactive. The application has a timer and on the Tick event, the timer is being stopped, some functions are being executed, and then the timer is enabled again. This should work properly and it does on my laptop. On a PC of a client it doesn't. When the PC is not in use then the application pauzes, in other words the timer stops ticking. When the mouse is moved or the application get focus (by clicking it) the timer continues like nothing happens

The problem is that I cannot reproduce this problem and I cannot debug it, because then the mouse is moved and the application continues. Very frustrating

The solution I now have, is to make the process High priority, but in my oppinion not a good solution. It should be working with a Low priority as well

Can anybody tell me what's going on

Best regards

Michiel Doeven
 
T

Tian Min Huang

Hello Michiel,

Thanks for your post. As I understand, the probem you are facing is that a
Timer event pauzes when application is inactive on a PC. I think more
information is needed before moving forward:

Does the problem occur to other computers?

What's its operating system, Windows 95/98/ME or Windows XP/2000/2003?

Did you apply any Windows Service Pack?

I look forward to your response.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
G

Guest

Hello

The problem did occur on my laptop a couple of times, but not consistently enough to even try a debug session (and as I said not really working)
Both PC's (a Toshiba Pro 6100 laptop and a Fujitsu Siemens Desktop) have Windows XP Professional
Both have service pack 1

Further, you understood correctly. As long as the PC is in use, there is no problem. However, the application that's running should work at night as well and shouldn't "fall asleep"

Best Regards

Michiel Doeven
 
T

Tian Min Huang

Hi Michael,

Thanks for your response. Now I know that the problem only occurs to a
laptop occationaly. If so, I am afraid that the laptop may run into
hibernation or battery-save mode at that time. Please check the setting of
your laptop and see whether this is the case.

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
G

Guest

Hello

I'm sorry, but you misunderstood. I'm developing on my laptop and the problem sometimes occurs on my laptop. But it's not easy to reproduce the problem (because the application continues when I move the mouse)
The problem occurs on another PC (of a customer) where the application seems to go to sleep. The PC never goes on stand-by automatically (only the screen goes off after 45 minutes or so). I recently made some changes with the database-connection and the remoted objects. This because exceptions were raised, because multiple threads accessed the same function in the same object at the same time. Maybe because of that the timer went to sleep (I don't know yet, no respons of my customer)

Thanks for your reply

Best regards

Michiel Doeve

----- Tian Min Huang wrote: ----

Hi Michael

Thanks for your response. Now I know that the problem only occurs to a
laptop occationaly. If so, I am afraid that the laptop may run into
hibernation or battery-save mode at that time. Please check the setting of
your laptop and see whether this is the case

Hope this helps

Regards

HuangT
Microsoft Online Partner Suppor
MCSE/MCS

Get Secure! -- www.microsoft.com/securit
This posting is provided "as is" with no warranties and confers no rights
 
T

Tian Min Huang

Hi Michiel,

Thanks for your update. If any further help is needed, could you post a
simple project which is able to reproduce the problem? I will be glad to
check it on my side.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
G

Guest

Hi

Well, the problem is, that it cannot be reproduced
As a matter of fact, the problem is resolved. At first I had one PC with a "Server" (an application that communicates with a PLC) and two different "Clients". Both "Clients" communicate with the "Server" through remoting. One "Client" does the interface with the customer, the other controls a machine by communicating with the "Server"

A week ago, I changed the situation. I now have three PC's. Two "Severs" (both connected to a PLC) on two PC's, four clients; one "Interface-client" on each PC and the controller on another. The PC that does had the "controller-client" does not have a "Server"
The result: Everything works 24/7

I don't know what resolved the problem. Maybe you have an idea? Should be nice to know what cause the problem to avoid it in the future

----- Tian Min Huang wrote: ----

Hi Michiel

Thanks for your update. If any further help is needed, could you post a
simple project which is able to reproduce the problem? I will be glad to
check it on my side

Have a nice day

Regards

HuangT
Microsoft Online Partner Suppor
MCSE/MCS

Get Secure! -- www.microsoft.com/securit
This posting is provided "as is" with no warranties and confers no rights
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top