App lockup

N

Nikolay Petrov

Hi guys
A have an application for proccessing some sensitive data, which is most of
the time displayed on app windows.
I want after some time of inactivity the application to become locked - its
windows to be hiden or something and a form to be displayed, so the user can
enter his username and password.
When starting this app, users have to login and I automaticly logout them
when they close the app.
But when the application is locked, I don't want to logout users, because
the will lose any changes done.
I only want to hide the app windows.

What I don't know how to track the user inactivity and how to hide all
currently opened form of my app (the user may have couple of forms opened).

TIA

P.S. By inactivity I mean that the user don't move the mouse or use the
keyboard (kind of what windows screen saver tracks), because the user may
just look at the application forms without intecating with my app, but work
with something else.
 
H

Hal Rosser

Nikolay Petrov said:
Hi guys
P.S. By inactivity I mean that the user don't move the mouse or use the
keyboard (kind of what windows screen saver tracks), because the user may
just look at the application forms without intecating with my app, but work
with something else.
You may be able to do this using the timer control.
Look at the events associated with the forms like keypress and mouseMove,
etc, to disable-then enable the timer - then when the timer's tick event
happens - do your thing - hide forms and show the login form which will in
turn show the forms being used and enable the timer again.
There may be other ways - but this is what comes to mind first.
Hal
 
N

Nikolay Petrov

I though about this, but this will track the activity only in this app, not
system wide.
Like I described, the user may just have an open form from my app and look
at it from time to time while working with other apps.
So it must be something system wide, maybe some Windows API to check the
inactivity of user.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top