Solved

Iddle Visual Foxpro Program

Posted on 2010-09-02
6
437 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 41

Accepted Solution

by:
pcelba earned 500 total points
Comment Utility
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
Comment Utility
thanks, i will try your solution.
0
 
LVL 1

Expert Comment

by:beroni
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 41

Expert Comment

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

Expert Comment

by:beroni
Comment Utility
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
Comment Utility
the solution solvs the question
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now