c# program pauses when machine is locked

Hi All,

I have a winform c# program thats on a 5 minute timer.  Once the timer counts down to zero, the program reads my outlook emails, then launches an excel object and does STUFF.

Here is the problem.  When I lock my machine, the timer still counts down, but hangs when it reaches zero.  It never launches the rest of the code.  When I log back in I see, the timer at zero, then the program continues as if nothing happened.  This is on my work pc with windows xp in a corporate environment.

Any ideas why my code hangs or how to prevent it?

Who is Participating?
Hi Solarissf,

When the computer goes into locked mode it's considered that no user is interacting with the desktop. While you can still execute code in a locked workstation it's the automation code that is the real problem. You may not be able to perform certain automation tasks while the desktop is in a locked state.
solarissfAuthor Commented:
ok, thanks
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.