Re: Determine if no activity in VFP App Screen

2008-11-07 Thread Philip Borkholder
Bingo John!
That is the route I've taken! :)
Thanks
Philip

Anthony J. Gundrum wrote:
 An off-the cuff thought here is to add a timer to the main form that resets
 itself whenever there is activity in the application.  If the timer reaches
 the 1 hour mark then have it call the log off procedure.

 John G.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of Steve Ellenoff
 Sent: Wednesday, November 05, 2008 23:50
 To: profox@leafe.com
 Subject: RE: Determine if no activity in VFP App Screen

 Expanding on Allen's idea here -- anytime Windows is shutting down it 
 sends shutdown messages to all running applications so that they can 
 do housecleaning. You can have VFP bind to this message (assuming 
 you're running VFP9) and have your app close itself down as Windows 
 is closing down as well. I don't have time at the moment to look 
 further into the details for you, but if you decide you like this 
 approach and get stuck, I'll see if I can find more of the details.
 Steve

 At 09:19 AM 11/05/2008, you wrote:
   
 I wonder if terminal server gives of a windows message. I would have
 
 thought
   
 so. If so maybe a bindevents might do the trick
 Allen

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Philip Borkholder
 Hello all,
 Does anyone have a method or API call to determine if a user has had no
 activity on the active screen on a workstation? (actually in a Terminal
 Server session) ?

 I have a customer, who already has Terminal Server set to decide if no
 activity has taken place for 2 hours, then it logs off the session, but
 then it bombs out the VFP app and messes up things.

 I need to have something on the VFP app to determine if there has been
 no activity in this session for 1 HOUR and then gracefully log off my
 app BEFORE the T.S. session shuts down because of inactivity.

 I'm not looking for a data related determination, but more so activity
 on the screen or something in Windows API to determine this if possible.




 
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Determine if no activity in VFP App Screen

2008-11-06 Thread Steve Ellenoff
Expanding on Allen's idea here -- anytime Windows is shutting down it 
sends shutdown messages to all running applications so that they can 
do housecleaning. You can have VFP bind to this message (assuming 
you're running VFP9) and have your app close itself down as Windows 
is closing down as well. I don't have time at the moment to look 
further into the details for you, but if you decide you like this 
approach and get stuck, I'll see if I can find more of the details.
Steve

At 09:19 AM 11/05/2008, you wrote:
I wonder if terminal server gives of a windows message. I would have thought
so. If so maybe a bindevents might do the trick
Allen

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Philip Borkholder
Hello all,
Does anyone have a method or API call to determine if a user has had no
activity on the active screen on a workstation? (actually in a Terminal
Server session) ?

I have a customer, who already has Terminal Server set to decide if no
activity has taken place for 2 hours, then it logs off the session, but
then it bombs out the VFP app and messes up things.

I need to have something on the VFP app to determine if there has been
no activity in this session for 1 HOUR and then gracefully log off my
app BEFORE the T.S. session shuts down because of inactivity.

I'm not looking for a data related determination, but more so activity
on the screen or something in Windows API to determine this if possible.




[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Determine if no activity in VFP App Screen

2008-11-06 Thread Anthony J. Gundrum
An off-the cuff thought here is to add a timer to the main form that resets
itself whenever there is activity in the application.  If the timer reaches
the 1 hour mark then have it call the log off procedure.

John G.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Steve Ellenoff
Sent: Wednesday, November 05, 2008 23:50
To: profox@leafe.com
Subject: RE: Determine if no activity in VFP App Screen

Expanding on Allen's idea here -- anytime Windows is shutting down it 
sends shutdown messages to all running applications so that they can 
do housecleaning. You can have VFP bind to this message (assuming 
you're running VFP9) and have your app close itself down as Windows 
is closing down as well. I don't have time at the moment to look 
further into the details for you, but if you decide you like this 
approach and get stuck, I'll see if I can find more of the details.
Steve

At 09:19 AM 11/05/2008, you wrote:
I wonder if terminal server gives of a windows message. I would have
thought
so. If so maybe a bindevents might do the trick
Allen

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Philip Borkholder
Hello all,
Does anyone have a method or API call to determine if a user has had no
activity on the active screen on a workstation? (actually in a Terminal
Server session) ?

I have a customer, who already has Terminal Server set to decide if no
activity has taken place for 2 hours, then it logs off the session, but
then it bombs out the VFP app and messes up things.

I need to have something on the VFP app to determine if there has been
no activity in this session for 1 HOUR and then gracefully log off my
app BEFORE the T.S. session shuts down because of inactivity.

I'm not looking for a data related determination, but more so activity
on the screen or something in Windows API to determine this if possible.




[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Determine if no activity in VFP App Screen

2008-11-05 Thread Allen
I wonder if terminal server gives of a windows message. I would have thought
so. If so maybe a bindevents might do the trick
Allen 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Philip Borkholder
Hello all,
Does anyone have a method or API call to determine if a user has had no 
activity on the active screen on a workstation? (actually in a Terminal 
Server session) ?

I have a customer, who already has Terminal Server set to decide if no 
activity has taken place for 2 hours, then it logs off the session, but 
then it bombs out the VFP app and messes up things.

I need to have something on the VFP app to determine if there has been 
no activity in this session for 1 HOUR and then gracefully log off my 
app BEFORE the T.S. session shuts down because of inactivity.

I'm not looking for a data related determination, but more so activity 
on the screen or something in Windows API to determine this if possible.




___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: Determine if no activity in VFP App Screen

2008-11-05 Thread MB Software Solutions General Account
Philip Borkholder wrote:
 Hello all,
 Does anyone have a method or API call to determine if a user has had no
 activity on the active screen on a workstation? (actually in a Terminal
 Server session) ?

 I have a customer, who already has Terminal Server set to decide if no
 activity has taken place for 2 hours, then it logs off the session, but
 then it bombs out the VFP app and messes up things.

 I need to have something on the VFP app to determine if there has been
 no activity in this session for 1 HOUR and then gracefully log off my
 app BEFORE the T.S. session shuts down because of inactivity.

 I'm not looking for a data related determination, but more so activity
 on the screen or something in Windows API to determine this if possible.


 Thanks,

 Philip B.


Hi, Philip.

It doesn't help with your question really (sorry!), but this is another
reason why I favor the disconnected approach, similar to what Charlie
Coleman uses.  Then again, it's easier for me since I'm not using VFP on
the backend anymore, but instead MySQL.

Let me take a stab at helping you:  Are you looking to somehow keep your
app alive by simulating some sort of activity so that the TS doesn't
disconnect?  Perhaps something in a timer where you move the mouse a
fraction of a foxel (...iow, a super small unit)?

Good luck!
--Michael






___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: Determine if no activity in VFP App Screen

2008-11-05 Thread Philip Borkholder
Hi Michael,
thanks for asking...
I actually have a customer using an app that keeps track of flags in the 
system when they are logged in.
Some users are leaving the app up and running in T.S. and then leave for 
the evening instead of logging off.
They set T.S. to forcibly close down the app and the T.S. session after 
2 hours of inactivity on T.S.
This is leaving the software with the flags of usage still set 
internally yada yada...

Since my first email
I've been experimenting with a timer on the particular form, that will 
shut the app down and I am resetting the timer in the following events 
of the form:
1) MouseDown()
2) KeyPress()
3) Moved()

I think this is actually what will allow me to do what I want to do now.

Thanks though,
Philip
MB Software Solutions General Account wrote:
 Philip Borkholder wrote:
   
 Hello all,
 Does anyone have a method or API call to determine if a user has had no
 activity on the active screen on a workstation? (actually in a Terminal
 Server session) ?

 I have a customer, who already has Terminal Server set to decide if no
 activity has taken place for 2 hours, then it logs off the session, but
 then it bombs out the VFP app and messes up things.

 I need to have something on the VFP app to determine if there has been
 no activity in this session for 1 HOUR and then gracefully log off my
 app BEFORE the T.S. session shuts down because of inactivity.

 I'm not looking for a data related determination, but more so activity
 on the screen or something in Windows API to determine this if possible.


 Thanks,

 Philip B.
 


 Hi, Philip.

 It doesn't help with your question really (sorry!), but this is another
 reason why I favor the disconnected approach, similar to what Charlie
 Coleman uses.  Then again, it's easier for me since I'm not using VFP on
 the backend anymore, but instead MySQL.

 Let me take a stab at helping you:  Are you looking to somehow keep your
 app alive by simulating some sort of activity so that the TS doesn't
 disconnect?  Perhaps something in a timer where you move the mouse a
 fraction of a foxel (...iow, a super small unit)?

 Good luck!
 --Michael






[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: Determine if no activity in VFP App Screen

2008-11-05 Thread Michael Madigan
Isn't there an on shutdown or on logoff routine built into foxpro?  
Wouldn't that work?

 

--- On Wed, 11/5/08, MB Software Solutions General Account [EMAIL PROTECTED] 
wrote:

From: MB Software Solutions General Account [EMAIL PROTECTED]
Subject: Re: Determine if no activity in VFP App Screen
To: ProFox Email List profox@leafe.com
Date: Wednesday, November 5, 2008, 3:48 PM

Philip Borkholder wrote:
 Hello all,
 Does anyone have a method or API call to determine if a user has had no
 activity on the active screen on a workstation? (actually in a Terminal
 Server session) ?

 I have a customer, who already has Terminal Server set to decide if no
 activity has taken place for 2 hours, then it logs off the session, but
 then it bombs out the VFP app and messes up things.

 I need to have something on the VFP app to determine if there has been
 no activity in this session for 1 HOUR and then gracefully log off my
 app BEFORE the T.S. session shuts down because of inactivity.

 I'm not looking for a data related determination, but more so activity
 on the screen or something in Windows API to determine this if possible.


 Thanks,

 Philip B.


Hi, Philip.

It doesn't help with your question really (sorry!), but this is another
reason why I favor the disconnected approach, similar to what Charlie
Coleman uses.  Then again, it's easier for me since I'm not using VFP
on
the backend anymore, but instead MySQL.

Let me take a stab at helping you:  Are you looking to somehow keep your
app alive by simulating some sort of activity so that the TS doesn't
disconnect?  Perhaps something in a timer where you move the mouse a
fraction of a foxel (...iow, a super small unit)?

Good luck!
--Michael






[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: Determine if no activity in VFP App Screen

2008-11-05 Thread Philip Borkholder
Hi Mike,
Yes that would work under other circumstances, however this is a resell 
app, with my own custom mods inside it. I don't have the full control of 
the on shutdown assignments.

thanks though,
Philip

Michael Madigan wrote:
 Isn't there an on shutdown or on logoff routine built into foxpro?  
 Wouldn't that work?

  

 --- On Wed, 11/5/08, MB Software Solutions General Account [EMAIL 
 PROTECTED] wrote:

 From: MB Software Solutions General Account [EMAIL PROTECTED]
 Subject: Re: Determine if no activity in VFP App Screen
 To: ProFox Email List profox@leafe.com
 Date: Wednesday, November 5, 2008, 3:48 PM

 Philip Borkholder wrote:
   
 Hello all,
 Does anyone have a method or API call to determine if a user has had no
 activity on the active screen on a workstation? (actually in a Terminal
 Server session) ?

 I have a customer, who already has Terminal Server set to decide if no
 activity has taken place for 2 hours, then it logs off the session, but
 then it bombs out the VFP app and messes up things.

 I need to have something on the VFP app to determine if there has been
 no activity in this session for 1 HOUR and then gracefully log off my
 app BEFORE the T.S. session shuts down because of inactivity.

 I'm not looking for a data related determination, but more so activity
 on the screen or something in Windows API to determine this if possible.


 Thanks,

 Philip B.
 


 Hi, Philip.

 It doesn't help with your question really (sorry!), but this is another
 reason why I favor the disconnected approach, similar to what Charlie
 Coleman uses.  Then again, it's easier for me since I'm not using VFP
 on
 the backend anymore, but instead MySQL.

 Let me take a stab at helping you:  Are you looking to somehow keep your
 app alive by simulating some sort of activity so that the TS doesn't
 disconnect?  Perhaps something in a timer where you move the mouse a
 fraction of a foxel (...iow, a super small unit)?

 Good luck!
 --Michael






[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: Determine if no activity in VFP App Screen

2008-11-05 Thread Steve Ellenoff
Expanding on Allen's idea here -- anytime Windows is shutting down it 
sends shutdown messages to all running applications so that they can 
do housecleaning. You can have VFP bind to this message (assuming 
you're running VFP9) and have your app close itself down as Windows 
is closing down as well. I don't have time at the moment to look 
further into the details for you, but if you decide you like this 
approach and get stuck, I'll see if I can find more of the details.
Steve

At 09:19 AM 11/05/2008, you wrote:
I wonder if terminal server gives of a windows message. I would have thought
so. If so maybe a bindevents might do the trick
Allen

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Philip Borkholder
Hello all,
Does anyone have a method or API call to determine if a user has had no
activity on the active screen on a workstation? (actually in a Terminal
Server session) ?

I have a customer, who already has Terminal Server set to decide if no
activity has taken place for 2 hours, then it logs off the session, but
then it bombs out the VFP app and messes up things.

I need to have something on the VFP app to determine if there has been
no activity in this session for 1 HOUR and then gracefully log off my
app BEFORE the T.S. session shuts down because of inactivity.

I'm not looking for a data related determination, but more so activity
on the screen or something in Windows API to determine this if possible.




[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.