Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I close a opened report preview programatical
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01256243
Message ID:
01256580
Vues:
15
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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform