?
Solved

Iddle Visual Foxpro Program

Posted on 2010-09-02
6
Medium Priority
?
452 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 43

Accepted Solution

by:
pcelba earned 2000 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 43

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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…
Social messanging services like WhatsApp and Facebook can help businesses in ways that many owners don't even imagine, giving new opportunities to connect with customers. Discover some of the most innovative things they can do for your company.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

850 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