PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms No activity on a form...

Reply

No activity on a form...

 
Thread Tools Rate Thread
Old 14-06-2008, 10:50 AM   #1
Simon Verona
Guest
 
Posts: n/a
Default No activity on a form...


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

  Reply With Quote
Old 14-06-2008, 01:01 PM   #2
Jeff Gaines
Guest
 
Posts: n/a
Default Re: No activity on a form...

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
  Reply With Quote
Old 14-06-2008, 05:52 PM   #3
Simon Verona
Guest
 
Posts: n/a
Default Re: No activity on a form...

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


  Reply With Quote
Old 14-06-2008, 06:09 PM   #4
Simon Verona
Guest
 
Posts: n/a
Default Re: No activity on a form...

I may have found a solution using a Windows call, see
http://vbnet.mvps.org/index.html?co...stinputinfo.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


  Reply With Quote
Old 14-06-2008, 10:01 PM   #5
Jeff Gaines
Guest
 
Posts: n/a
Default Re: No activity on a form...

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.
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off