December 14, 1998

This code and template set is intended to provide an activity timeout capability that only
takes a little bit of effort to implement. My template skills are very, very limited at
this time and I couldn't figure out how to get the Let_User_Cancel_Timeout routine into
a template, hence the .TXA file. I'm admitting up front that this is a first for me, and
I'd like to hear from anyone who can tell me how to make this more automatic. In particular,
I can't figure out how to add the main-frame code to test for the inactivity timeout in
any manner other than telling the user what embed to go to and then selecting the code
template.

This is actually a distillation of timeout 'pieces' that are wrapped into a major app
we're developing right now, so although the concepts have been working for me for a 
while, this integrated template is only a few hours old at this writing.

I've tested this particular formulation of my timeout concept in C5 Gold, using a single
app (as opposed to a multi-DLL app), running in 32-bit mode. All seems to work with no
problems.

How to install the Timeout Template:

1) Register the Timeout.TPL file.
   Family name for the template set is HorizonTimeout

2) Import the UserCan.TXA file into your app. This is a window routine that gives the
   user 20 seconds to cancel when the timeout occurs.

3) Add the TimeOut Global Data extension to your app. If you have a multi-dll app, add
   this to your global-data app.

4) Add the Timeout Global Code extension to every app file. Set the number of seconds
   of inactivity you want. Zero disables the timeout. You can also override this timeout
   value in code by assigning the timeout period in hundredths of a second to the
   variable GLO:TimeoutMax.

5) Add the TimeoutTest Code template to your Main Application frame window by inserting
   an embed at Local Objects|ThisWindow|TakeEvent|Code after the 'Top of Cycle/Break
   Support' line, and selecting the TimeoutTest code template.

6) make sure the main window has a timer value. Any value will do, but something around
   100 (1 second) would be sufficient for the timeout check. If you already have a value
   in this field, don't change it just because I said 100 sounded good...

Have Fun!  Feel free to email any comments, suggestions, etc to me at gelpilot@aol.com

George Lehmann
Horizon Business Concepts