Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Releasing Forms
Message
De
02/04/1999 08:24:01
Paul Frost
Instem Computer Systems Ltd
Stone, Royaume Uni
 
 
À
02/04/1999 08:04:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00204591
Message ID:
00204600
Vues:
13
>I have a medical system with patient records which, when you select a particular patient, the user first sees the 'Main Patient Details Screen (Form A), then a history of events (Form B) and then individual events (Form C).
>At present the user, when viewing Form C, is taken back to Form B then back to Form A using the thisform.release command.
>How can I get the user back to Form A from Form C without going thru Form B? Or is it better to release a form from memory as soon as the user loads another form into memory - is this quicker/more efficient?

I have used several ways, two suggestions

1) simplest is a 'global' flag to indicate that indicates whether you want to drop back to B or A

in B do something like (assuming modal forms)

DO formC ...
IF BackToA
thisform.Release
ENDIF

in form C, the BackToA flag is set as required before releasing form
This method keeps the previous forms in existence.

2) Another technique I have used is to have a front 'memu' form containing a WHILE loop & a variable indicating the form to display, when moving from one form to another, set the next form to be displayed & then release the form. This method keeps a minimum number of forms in existence, i.e the menu form & the active form.

In menu form the code is something like

DO WHILE nextform # 0
DO CASE
CASE nextform = 1
DO FormA ...
CASE nextform=2
DO FormB
ENDCASE
ENDDO


on exit from a form do something like

nextform = 1
thisform.Release

There must be lots of other techniques to achieve the same ends, mine are probably not the best, but I hope the suggestions help.

Paul
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform