Welcome to Clarion Community Sign in | Join | Faq

Clarion Language and Runtime Library

Started by z80jim at 05-01-2008 6:17 AM. Topic has 4 replies.

Print Search
Sort Posts:    
   05-01-2008, 6:17 AM
z80jim is not online. Last active: 5/2/2008 7:14:08 PM z80jim

Top 50 Posts
Joined on 12-16-2005
Posts 14
Automatically Close window on no activity
Reply Quote
I write my Clarion applications by hand. There are certain windows that users leave open that I would like to time out and close automatically after a certain amount of no activity.

Does anyone have any suggestions?

Regards,
Jim
   Report 
   05-01-2008, 11:23 AM
Shankar is not online. Last active: 11/14/2008 4:04:22 PM Shankar

Top 10 Posts
Joined on 10-24-2005
Dubai, UAE
Posts 219
Re: Automatically Close window on no activity
Reply Quote
Hi Jim,

There must certain APIs you can use to find out the time elapsed since the last keystroke or mouse movement but the easier approach is to invest in vuFileTools from www.valutilities.com which has a function for just that. You could also try out the IDLE([procedure] [,separation]) function in Clarion. Check the help for more info.

Regards

Shankar
   Report 
   05-02-2008, 6:17 AM
Russ is not online. Last active: 10/18/2008 7:50:29 PM Russ

Top 10 Posts
Joined on 10-20-2005
Posts 223
Re: Automatically Close window on no activity
Reply Quote
Put a timer on the window and if a mouse event or key press, set the count value to zero. When count value => limit value, then POST(EVENT:CloseWindow).

That is the rough idea, the code should not be difficult to write.
Russ Eggen
www.radfusion.com

   Report 
   05-02-2008, 7:16 AM
z80jim is not online. Last active: 5/2/2008 7:14:08 PM z80jim

Top 50 Posts
Joined on 12-16-2005
Posts 14
Re: Automatically Close window on no activity
Reply Quote
Russ,

Sounds good. I thought about the timer event since I use them in a number of places but I completely blanked on trapping for a key or mouse.

I will have to play around with it.

Thanks
   Report 
   05-02-2008, 2:31 PM
Tony Tetley is not online. Last active: 11/20/2008 1:04:35 PM Tony Tetley



Top 10 Posts
Joined on 10-25-2005
Missouri, USA
Posts 80
Re: Automatically Close window on no activity
Reply Quote
If you want to roll your own, look at the GetLastInputInfo API call (user32.dll).  Not supported prior to Win 2000 I think.

Tony

   Report 
Clarion Communi... » Clarion » Clarion Languag... » Re: Automatically Close window on no activity

Powered by Community Server, by Telligent Systems