Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Timer problem in VFP5a
Message
 
À
18/05/1997 03:03:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00032693
Message ID:
00032811
Vues:
35
>one option is to use the API
>have the parser SendMessage to the second program
>and have the second program use PeekMessage to read it)
>
The Parser is not meant to shut-down until all front-ends have been shut-down. But what I could do is to have the last instance of the Front-End app SendMessage to the Parser to shutdown. I will try this. Thank You.

>there are other ways including for example making the other program
>terminate as well when the counter is 0 etc.
>
I'm already doing this but its not working. Whenever I close the last Instance of my Front-End app, I check that table manuall from VFP
to see if its value is set to 0, and sure enough, it is, but the Parser for some reason does not close down. If I launch the parser exe itself from Windows Explorer, 10 seconds later it shuts-down since the counter is 0. I even have code referencing the Timer in the GotFocus Event of the Parser form, so that whenever it get's focus, it fires the timer which checks the value of the counter in the table. I should mention that the Parser form is a TopLevel form.

>but why not instantiate the parser program from within the first one
>(either as an in-process or out-of-process server?)
>then you can communicate between the programs better
>
The Parser is constantly supplied with a file to parse. If it is included in the Front-end app, performance both for the parser and the Front-End UI becomes very poor. Secondly, if someone is editing a form, the insertion point keeps on resetting to the first position in the string whenever the parser's timer fires to check for an available file to parse.

The whole point of running under a separate Windows session is to let the OS distribute available system resources. I believe Windows is better at this than any timer design in a VFP app. Secondly, some of my clients will be using Windows NT, which is even more efficient at resource management for separate program sessions than Windows 95. And if what I'm hearing is correct, that MS is dropping Windows 97 and making a push for NT 5, the approach I'm taking will have better long-term results.

Thank you for your help, Arnon.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform