What is the easiest way of tracking whether there has been any activity on a
form at all in a specific time ?

I want to have a form that automatically "timeouts" after a period of no
activity. I don't really want to have to go through every button, box and
catch every mouse-click etc. to know that the user is actively using the
form - I just want to be able to somehow have a function called which can
then close the form if there has been no activity for a few minutes.

I don't actually mind if the "no activity" is just on that form, or I have
to rely on no-activity on the whole pc for a period of time..

Many thanks in advance

Simon

Re: No activity on a form... by Jeff

Jeff
Sat Jun 14 07:01:39 CDT 2008

On 14/06/2008 in message <#OxNsQgzIHA.4912@TK2MSFTNGP03.phx.gbl> Simon
Verona wrote:

>What is the easiest way of tracking whether there has been any activity on
>a form at all in a specific time ?
>
>I want to have a form that automatically "timeouts" after a period of no
>activity. I don't really want to have to go through every button, box and
>catch every mouse-click etc. to know that the user is actively using the
>form - I just want to be able to somehow have a function called which can
>then close the form if there has been no activity for a few minutes.
>
>I don't actually mind if the "no activity" is just on that form, or I have
>to rely on no-activity on the whole pc for a period of time..
>
>Many thanks in advance
>
>Simon

What about starting a timer and a counter in the Form Activate event then
comparing the time difference with the countdown in the timer tick event?

--
Jeff Gaines Damerham Hampshire UK
By the time you can make ends meet they move the ends

Re: No activity on a form... by Simon

Simon
Sat Jun 14 11:52:41 CDT 2008

Not sure I'm following!

The form activate event is only fired when the form is first opened? Are
you suggesting that the timer would be reset when the Form Activate event is
fired? Or have I gotton confused (I'm afraid I'm easily confused <G>).

Regards
Simon

"Jeff Gaines" <whitedragon@newsgroups.nospam> wrote in message
news:xn0frf6zr6v8rif000@msnews.microsoft.com...
> On 14/06/2008 in message <#OxNsQgzIHA.4912@TK2MSFTNGP03.phx.gbl> Simon
> Verona wrote:
>
>>What is the easiest way of tracking whether there has been any activity on
>>a form at all in a specific time ?
>>
>>I want to have a form that automatically "timeouts" after a period of no
>>activity. I don't really want to have to go through every button, box and
>>catch every mouse-click etc. to know that the user is actively using the
>>form - I just want to be able to somehow have a function called which can
>>then close the form if there has been no activity for a few minutes.
>>
>>I don't actually mind if the "no activity" is just on that form, or I have
>>to rely on no-activity on the whole pc for a period of time..
>>
>>Many thanks in advance
>>
>>Simon
>
> What about starting a timer and a counter in the Form Activate event then
> comparing the time difference with the countdown in the timer tick event?
>
> --
> Jeff Gaines Damerham Hampshire UK
> By the time you can make ends meet they move the ends


Re: No activity on a form... by Simon

Simon
Sat Jun 14 12:09:32 CDT 2008

I may have found a solution using a Windows call, see
http://vbnet.mvps.org/index.html?code/system/getlastinputinfo.htm

Regards
Simon
"Jeff Gaines" <whitedragon@newsgroups.nospam> wrote in message
news:xn0frf6zr6v8rif000@msnews.microsoft.com...
> On 14/06/2008 in message <#OxNsQgzIHA.4912@TK2MSFTNGP03.phx.gbl> Simon
> Verona wrote:
>
>>What is the easiest way of tracking whether there has been any activity on
>>a form at all in a specific time ?
>>
>>I want to have a form that automatically "timeouts" after a period of no
>>activity. I don't really want to have to go through every button, box and
>>catch every mouse-click etc. to know that the user is actively using the
>>form - I just want to be able to somehow have a function called which can
>>then close the form if there has been no activity for a few minutes.
>>
>>I don't actually mind if the "no activity" is just on that form, or I have
>>to rely on no-activity on the whole pc for a period of time..
>>
>>Many thanks in advance
>>
>>Simon
>
> What about starting a timer and a counter in the Form Activate event then
> comparing the time difference with the countdown in the timer tick event?
>
> --
> Jeff Gaines Damerham Hampshire UK
> By the time you can make ends meet they move the ends


Re: No activity on a form... by Jeff

Jeff
Sat Jun 14 16:01:08 CDT 2008

On 14/06/2008 in message
<29648220-2597-4F89-8E0C-DEBE44C444E6@microsoft.com> Simon Verona wrote:

>The form activate event is only fired when the form is first opened? Are
>you suggesting that the timer would be reset when the Form Activate event
>is fired? Or have I gotton confused (I'm afraid I'm easily confused <G>).

Form Activate is fired every time the from is activated.

--
Jeff Gaines Damerham Hampshire UK
Tell me what you need, and I'll tell you how to get along without it.