Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

Lock an application

Hi,

I have a c# application that should do like a screensaver, in a way to lock the desktop if there's no activity for 5 min.

I alreday wrote the code to lock the application, but the problem is if i'm working on another window (like a IE window or word) i can't trap the mouse or the keyboard activity. Does anyone has an idea on how to do that ??

10x a lot
0
zwizeguyz
Asked:
zwizeguyz
2 Solutions
 
_TAD_Commented:


Yes, you need to use windows messaging (your are currently using application messaging).


For this you will need to use windows API


Here is a web site for monitoring windows messages...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/messagesandmessagequeues.asp


0
 
ptmcompCommented:
Change the extension from .exe to .scr and install it as screensaver (if it has to be permanent)
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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