Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Inactivity timeout

Inactivity timeout

Inactivity timeout

Is there any way to close an application, gracefully of course, when a user has left the program open for hours on end with no activity?

I have an application on my primary server accessed through the Terminal Server, I do not want to close the terminal server session but want close the application only as they might and usually are in another program.

Clarion code or something else?

RE: Inactivity timeout


You could try the code below OR buy vuFileTools from www.valutilities.com and use the vuIdleTime() function in that library.


! Prototype

! data types
cbSize         UNSIGNED(8)         !SIZE(LASTINPUTINFO)
dwTime         ULONG               ! milliseconds

dwTime is the number of milliseconds since the last computer boot

! local data
Hours      LONG
Minutes    LONG
Seconds    LONG

! code
    IF GetLastInputInfo(LastInput)
       Hours   = INT(LastInput.dwTime / 3600000)
       Minutes = INT((LastInput.dwTime - (Hours * 3600000)) / 60000)
       Seconds = INT((LastInput.dwTime - (Hours * 3600000) - (Minutes * 60000) ) / 1000)
       ?LastInputInfo{Prop:Text} = LastInput.dwTime & ' ' & Format(Hours,@n02) & ':' & FORMAT(Minutes,@n02) & ':' & FORMAT(Seconds,@n02)

The correct embed for this code is the TIMER event on the AppFrame window.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close