0

We need to show an application pop-up asking somethings to the user when he tries to lock the Windows, i. e. before the Windows actually locks.

Is there some way to do that?

Marcelo Dias
  • 409
  • 2
  • 18
  • Take a look at this answer: http://stackoverflow.com/questions/44980/how-can-i-programmatically-determine-if-my-workstation-is-locked – Gary Wright Feb 12 '15 at 14:19
  • Thank you for your comment Gary, but it not help me because we not only need to know the current state of the machine. We must actively prevent the Windows to be locked and prompt a message to the user (to be answered before he goes out). – Marcelo Dias Feb 12 '15 at 14:24
  • Yes, I see your point. You can disable screen lock entirely in the registry, so I did wonder whether you could programmatically do this, then handle the lock request yourself. The problem with this is that the lock option then disappears from the Ctrl-Alt-Delete menu. I don't think there is an easy answer I'm afraid. – Gary Wright Feb 12 '15 at 14:45
  • I don't know whether this is possible, but if it is you would probably need to do it via a Credential Provider. https://msdn.microsoft.com/en-us/library/windows/desktop/bb648647%28v=vs.85%29.aspx – Harry Johnston Feb 12 '15 at 19:25

0 Answers0