tags:

views:

48

answers:

2

In my application I need to minizime to tray (doing stuff like visible=false, FormWindowState = minimized etc.) automatically after some time.

The problem is, that when Windows is locked when this code executes, it doesn't happen (I'm guessing that while Windows is locked all form operations doesn't take place or something)

Does anyone know what can I do?

+3  A: 

Refer to this question: http://stackoverflow.com/questions/44980

When your app needs to minimize to the tray, set a flag. When the session unlock occurs, check the flag and, if set, perform the minimize again.

Bradley Smith
A: 

Easiest thing to do, run the time consuming task with help of the BackGroundWorker, so your UI stays responsive.

yan.kun
That is not the problem here. The OP talks about the workstation being locked, not the app being unresponsive.
0xA3
That's indeed what the OP is trying to communicate, but it wasn't communicated well, imho.
asbjornu
I agree it wasn't communicated well, sorry about that
Boaz