开发者

C# Form Doesn't get minimized on microsoft windows when the workstation is locked

In my application I need to minizime to tray (doing stuff like visible=false, FormWindowState = minimized etc.) automa开发者_开发技巧tically 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?


Refer to this question: How can I programmatically determine if my workstation is locked?

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.


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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜