Startbeitrag von PETER ZHOU am 12.08.2013 09:58
Hi,
Is there a way to detect no activity ( no mouse or keyboard event detected ) in windev ( for example after 10 mins ), just go back to the MAIN screen ( first window ) ?
Regards,
PETER ZHOU
Is there a way to detect no activity ( no mouse or keyboard event detected ) in windev ( for example after 10 mins ), just go back to the MAIN screen ( first window ) ?
Regards,
PETER ZHOU
Antworten:
There is... I remember having seen such an example in WD5.5b.
Not sure but I believe it ran based on either (most likely nr 2):
1) a windows API
2) a combination of a windev timer and event capturing using the Event() function...
Something like:
Event(MyCaptureInputProcedure, "*.*", WM_MOUSEMOVE) //mouse movements
Event(MyCaptureInputProcedure, "*.*", WM_LBUTTONDOWN) //for left mouse button clicked
Event(MyCaptureInputProcedure, "*.*", WM_KEYDOWN) //for keyboard pressed
...
I think the second route is the easiest to follow. Check this page as a starter:
http://doc.pcsoft.fr/en-US/?3014007&name=toucheenfoncee_fonction
Cheers,
Peter H.
von Peter Holemans - am 12.08.2013 10:27
Thank you for the reply.
It does look complicated..
Any easier method ?
von Peter Zhou - am 13.08.2013 09:00
There is an automatic close option on windows and also timers are available on buttons so they may offer a solution. There is a timer example and an alarm example that show some code for timers.
Regards
Al
von Al - am 13.08.2013 09:16
Hi Peter,
Complicated?
A maximum of 10 lines of code in the project init code and a procedure that closes the open windows and leaves the main window open (About another 20 lines I guess)...
That doesn't sound too complicated, does it?
Just my 2 cents...
Cheers,
Peter H.
von Peter Holemans - am 13.08.2013 10:08
I found ways to do it ( thanks to both of you - Al and yourself ).
Yes, the EVENT will reset the timer procedure.
von Peter Zhou - am 13.08.2013 13:25