Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I close a opened report preview programatical
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01256243
Message ID:
01256580
Views:
14
I tested this code. But I met this message "Cannot quit Visual Foxpro"






>>I want to close all opened report preview window in users session.
>>I tried Keyboard '{CTRL+F4}' or Keyboard '{ESC}'. But it is useless
>>
>>thanks in advanced
>>
>>
>>
>>
>>cMesaj = "The program automatically will be closed in ten seconds ..."
>>messagebox(cMesaj, 48, "The program is closing", 10000)
>>Keyboard '{CTRL+F4}'  && this line is to close report preview window in session. But it is useless
>>QUIT                  && if there is a opened report preview window in a session,
>>                      && Program gives this mesaj only. "Cannot quit Visual Foxpro"
>>
>
>
>How about:
>
>cMesaj = "The program automatically will be closed in ten seconds ..."
>messagebox(cMesaj, 48, "The program is closing", 10000)
>
>*** Invoke you usual cleaning routine
>
>QUIT
>
>
>
>If you don't have one (Grrr):
>
>cMesaj = "The program automatically will be closed in ten seconds ..."
>messagebox(cMesaj, 48, "The program is closing", 10000)
>lnFormToClose = 1
>FOR lnForm = 1 TO _screen.FormCount
>    IF TYPE("_screen.Forms(lnFormToClose)") == "O" .AND. .NOT. ISNULL(_screen.Forms(lnFormToClose))
>       IF _screen.Forms(lnFormToClose).Baseclass == "Form"
>          _screen.Forms(lnFormToClose).Release()
>       ELSE
>          lnFormToClose = lnFormToClose + 1
>       ENDIF
>    ENDIF
>NEXT
>CLEAR EVENTS
>QUIT
>
>(not tested)
Previous
Reply
Map
View

Click here to load this message in the networking platform