Solved

Iddle Visual Foxpro Program

Posted on 2010-09-02
6
442 Views
Last Modified: 2012-05-10
We need to check when a Visual Foxpro program hasn't been doing nothing during a certain amount of time. After that time we would like to close the program automatically.  Could you please tell if there is some parameter or solution that measures the program iddle time?
Best Regards
Lucilia
0
Comment
Question by:luciliacoelho
  • 2
  • 2
  • 2
6 Comments
 
LVL 42

Accepted Solution

by:
pcelba earned 500 total points
ID: 33588041
To check if a user logged on the computer is doing nothing is relatively easy and you may look at one solution here: http://www.experts-exchange.com/Microsoft/Applications/FoxPro/Q_25534460.html

To check if he is doing nothing in VFP application is more complex because you have to do it in application itself and then you have to decide what to do with screens/forms in edit mode, what to do with unsaved buffers etc.

You may incorporate various timers into your application and you have to reset some counter values when the application is used actively. The timer can check counter values periodically and if they do not change for certain period of time then you should display a warning and possibly exit the app.
0
 

Author Comment

by:luciliacoelho
ID: 33592893
thanks, i will try your solution.
0
 
LVL 1

Expert Comment

by:beroni
ID: 33790925
You can use DOEVENTS for simple tasks such as making it possible for the user to cancel a process after it starts, for example, searching for a file. Long-running processes that yield control of the processor are better performed using a Timer control or delegating the task to a COM Server executable (.exe). In this situation, the task can continue independently of your application, and the operating system takes care of multitasking and time allocation.

0
The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

 
LVL 42

Expert Comment

by:pcelba
ID: 33791799
Beroni how it can help to solve the question? luciliacoelho does not have problem with multitasking.
0
 
LVL 1

Expert Comment

by:beroni
ID: 33796264
Hi Pcelba,
I'm sorry I did a mistake, I didn't read carefully the question...
Sometimes applications seems to be frozen, and  the problem is it does not give the control to the SO in strong operations.I did this solution only to minimize the tipical mesasge like "application is not responding".
To automatically stop applications, when the application is a DLL, I use the Service Components, to configure how many instances are open, and the life of the COM+ component.
0
 

Author Closing Comment

by:luciliacoelho
ID: 33942073
the solution solvs the question
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
The business world is becoming increasingly integrated with tech. It’s not just for a select few anymore — but what about if you have a small business? It may be easier than you think to integrate technology into your small business, and it’s likely…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question