Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Created with Define Window
Message
From
07/06/2018 06:54:18
 
 
To
07/06/2018 05:20:49
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01660589
Message ID:
01660622
Views:
60
I haven't used Define Windows in as long as I can remember.

>True, although the added entry was not a big flag for its usefulness when I first read it.
>Only when digging into porting options the benefit became clear and most other devs around then (Y2K) did either not know the syntax or the big benefits...
>Later I created a special version of the 2.x screen generator, inserting the NAME clause depending on some other infos
>
>>That was also my first thought. I find it surprising that people seem to not read Help thoroughly!
>>
>>>Perhaps the other way around is better: Have you tried the NAME option of define window ?
>>>
>>>>>Hi,
>>>>>
>>>>>I have the following code in my application that creates a window in which a report is previewed. Here is the code:
>>>>>
>>>>>DEFINE WINDOW RepWindow ;
>>>>>   FROM 1, 1 TO 20, 20 ;
>>>>>   TITLE cReportTitle SYSTEM 
>>>>>
>>>>>ZOOM Window RepWindow  Max
>>>>>
>>>>>WAIT CLEAR 
>>>>>
>>>>>REPORT FORM (cReportFrxName) TO PRINTER PROMPT  PREVIEW WINDOW RepWindow
>>>>>
>>>>>RELEASE WINDOW RepWindow	
>>>>>
>>>>>
>>>>>While user is previewing the report (at the line REPORT FORM above), a code in another place of the application scans all open windows, as such:
>>>>>
>>>>>lnForms = _screen.formcount
>>>>>	 
>>>>>FOR i = lnForms to 1 STEP -1
>>>>>
>>>>>     *-- try to release this form:
>>>>>     _screen.Forms(i).Release
>>>>>
>>>>>ENDFOR
>>>>>
>>>>>
>>>>>But the _screen.formcount does not seem to include the form created with the DEFINE WINDOW (above).
>>>>>
>>>>>How can I either include the form created with DEFINE WINDOW in the _screen.formcount? Or how can I check if this form created with DEFINE WINDOW exists?
>>>>>
>>>>>TIA
>>>>
>>>>Cetin's suggestion to use WEXISTS() almost work. That is, the code detects that the window exists. But when the code calls to release the window (RELEASE WINDOW RepWindow) the window does not go away. That is, if the Window is open and shows a Report Preview, RELEASE it does not affect it.
>>>>Therefore, my question is, how do you close the Window programmatically? Or, when a user is previewing a FRX file and the Report Preview toolbar shows the icon to Close the Preview, what command is fired? If I knew this command, I would call it programatically.
Previous
Reply
Map
View

Click here to load this message in the networking platform