开发者

How do you keep a program running after Standby?

开发者 https://www.devze.com 2023-04-09 14:52 出处:网络
I wrote a very simple .Net windows application that sits in the system tray and queries a db every 15 minutes.It works great without any issues, except when the computer goes into standby mode.After t

I wrote a very simple .Net windows application that sits in the system tray and queries a db every 15 minutes. It works great without any issues, except when the computer goes into standby mode. After the user wakes the computer back up, the icon in the system tray is gone,开发者_如何学Go and the program is no longer running.

How can I make it so that the program continues running after a standby or hibernate? I have very little control over the box settings since this is a corporate environment, but I could make changes to the program itself if there is a way to do this through code.

The OS is XP - some will be upgraded to Windows 7 soon. Im using Visual Studio 2005.


It already runs after a system suspension, if it was running during the suspend! Probably, you application exits after having started the wake up or just before the suspension.

It could be a crash, but this would show an informative error message.

You need to track the application execution (i.e. A log system), then find the problem and fix it. Maybe the network connnection could be the point of failure, but not sure: the DB connection is still valid after a standby?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号