Solved

Lock an application

Posted on 2003-11-20
4
251 Views
Last Modified: 2012-05-04
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
Comment
Question by:zwizeguyz
4 Comments
 
LVL 22

Accepted Solution

by:
_TAD_ earned 25 total points
ID: 9790960


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
 
LVL 10

Assisted Solution

by:ptmcomp
ptmcomp earned 25 total points
ID: 9800134
Change the extension from .exe to .scr and install it as screensaver (if it has to be permanent)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question