Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Closing an Edit Window Programmatically
Message
De
28/10/2003 16:01:35
 
 
À
28/10/2003 15:44:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00843762
Message ID:
00843779
Vues:
27
David,

You can close any window in VFP with the RELEASE WINDOWS command, or make it invisible with the HIDE WINDOWS command.

Problem is, code edit windows do not have a standard name. They take the name of the procedure file being edited. This must be the case, for otherwise you could only have one code edit window displayed at any one time.

For example, MODI COMM test places the code in a window names "test" that can be closed with
RELEASE WINDOWS test.
IF test is the window with focus, you can get the name of the window with WONTOP(). So,
HIDE WINDOW WONTOP()
would hide the window with focus, in this case "test".

You can hide all open windows when your application runs using a loop something like this:
DO WHILE !EMPTY( WONTOP() )
   HIDE WINDOW WONTOP()
ENDO
If you want to save the window names to restore them to visibility when the application closes, a global array would be a good choice of structure.

Regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform