Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Iddle Visual Foxpro Program

Posted on 2010-09-02
6
Medium Priority
?
449 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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…
As much as Microsoft wants to kill off PST file support, just as they tried to do with public folders, there are still times when it is useful or downright necessary to export Exchange mailboxes to PST files. Thankfully, it is still possible to e…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

618 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