Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programing the red X at the top of the form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01587193
Message ID:
01587202
Views:
101
You can use QueryUnload event in combination with ReleaseType form property

>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
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform