Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetMessage API Hook in Form
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00888527
Message ID:
00889082
Views:
28
Brent,

So you have a VFP form that you want to close when VFP gets the shutdown message? If so you can:
* YourAppMain.prg
on shutdown CloseFormOrEnd()
do mymenu.mpr
read events
return


function CloseFormOrEnd()

if ( _screen.FormCount = 0 )
   * no forms open, shutdown the whole app
   on shutdown
   clear events
else
   if ( _screen.ActiveForm.QueryUnload() )
      _screen.ActiveForm.Release()
   endif
endif
>Thank you very much for your help! You are right about ON SHUTDOWN. However, I am not exiting FoxPro, I am just trying to exit the form and return to the FoxPro system menu to choose another option. Hence, the ON SHUTDOWN command is not activated by trying to exit the form.
>
>Do you possibly have any other suggestions? I really appreciate your help.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform