MDI App Timeout

S

Stanley

I have an MDI app that I need to timeout after a certain amount of time, say
30 minutes. I am looking for a way to make sure that if the user selects a
childform or types something in the childform or selects a menu item or even
just clicks on something in the app it will not timeout. But if the user
minimizes the app and does nothing with it for the preset time or just walks
away from their PC for that longer than the preset time that the app will
give them a warning that the application is closing. So far I have looked at
trying to do mouse clicks and keyboard presses but I can't seem to figure
out how to do it without having to write something in every childwindow. I
have also looked at Application.Idle but it seems that if something else is
going on on the machine like I am working with another application the
Applicaiton never seems to go idle until all typeing and mouse clicks have
stopped all together. Has anyone come up with a way to do something like
this? The timer part is easy of course my biggest issue is how to catch all
mouse clicks within the parent form as well as keystrokes but ignore
everything outside the app.

TIA

-Stanley
 
G

Guest

Hi stanley,

try it with a hook. You will find information on MSDN technical articles for example.

With an hook you can filter all windows messages of a given type.

Hope that helps

Thomas
 

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