Solved

Iddle Visual Foxpro Program

Posted on 2010-09-02
6
444 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 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
Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

 
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

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Alter Cursor Results 4 155
FORM caption height 4 220
Foxpro V9 query to compare two columns 5 340
VFP 7 or VFP 9 Image/Detail Band Resize 9 118
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…
Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

739 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