I am trying to use TAdvLockapp component to lock application if there is no user activity at a specified amount of time (in my test 30 sec). The problem is that app is always locked, even though I generate user activity (clicking the mouse for example). I am using version 188.8.131.52 of the component.
The component is in the main form of the app, does it have to be on EVERY form ?
Can you provide sample project to reproduce this? OR can you also reproduce this issue in our demo?
This is very easy to reproduce. Create new app with one form. Put TAdvLockApp component to the form.
Set IdleSeconds 30 and enabled=true. Create 2 labels:
Run the app wait 30 sec it goes locked, unlock it, Then keep moving (or resizing) the window during the next 30-40 sec and it is locked: AND there is not 30 sec from the last movement !
We really could not reproduce this issue here by following the above details, we saw correctly updating idle time whenever mouse moves... and never locked before idle 30 sec. Please provide more details. Btw your OS?
I have Windows Server 2008 R2 64 bit and Delphi XE2, the app is 32 bit
How the component is trying to detect Application activity ?
I tested it also with Windows 7 (32bit), goes to locked state after 30-50 sec, even though I keep moving the window.
There is however a slight difference compared to W2008/R2: there onIdle happens every second, updating the window caption. In W7 onIdle does not update the caption, only if the mouse is on the app window, onIdle seems to fire.
This is very strange, if OnIdle is triggered on every second (due to mouse move) then how it is reaching to 30 second, there must be some thing missing. We could not reproduce this issue here with the given information. Please provide sample project to reproduce it.
I wonder why you cannot reproduce this, because this is so obvious: Generate new app, put the component on the form. Set idlesec=30, and enabled=true. Run the app, wait 30 sec, the app is locked, unlock it. Then drag the mouse from the form caption to move the form (to generate activity). Keep dong this about 30-50 sec and the app is locked again !. If you do not wait the first 30 sec do so that the app is not locked for the first time, the component seems to be working correctly.
Finally we reproduced this issue. 30 Sec and second time lock were really not required. Single and long mouse clipped was mainly required to reproduce this issue, which is now fixed.