Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing an Edit Window Programmatically
Message
From
28/10/2003 16:01:35
 
 
To
28/10/2003 15:44:23
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00843762
Message ID:
00843779
Views:
26
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform