Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programing the red X at the top of the form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Programing the red X at the top of the form
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01587193
Message ID:
01587193
Vues:
208
I have a program that runs a form within a loop. It opens some files, set some variables, and runs the form.
The data is entered and when the Save button is clicked, it releases the form, returns to the program and
repeats the loop.

I do this by checking a flag (m0flag) and if it is still equal to "inproc" (its set to this before the loop starts
the first time) the loop repeats. The usual way I exit is to have an "Exit" button that sets the m0flag to 'quit'
and releases the form. Because m0flag does not equal 'inproc' the loop is completed and the program exited.

This works fine, except some of our users still want to be able hit the red x at the top of the form. Therefore
I need a way to program the red x to set m0flag to 'quit' before it releases the form. I can't use the lost focus,
or destroy event buttons because when the Save button releases the form that event is activated and the
loop is exited.

I only want to exit the loop if the x is clicked.

Any ideas would be appreciated.

Brad
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform