• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 628
  • Last Modified:

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?

1 Solution
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now