Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Programing the red X at the top of the form
Versions des environnements
Network:
Windows 2008 Server
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement