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.comNo trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.