Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem exiting program
Message
From
02/12/2004 09:58:03
 
 
To
02/12/2004 09:36:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
00966368
Message ID:
00966378
Views:
8
Is Blah () return .T.? Are you return .F. from the Init of the form?

Also, with the code you posted, the form will close whatever I respond the the message box because THISFORM.Release is outside de IF. Code should look like this:
LOCAL nResponse

nResponse=MESSAGEBOX('Do you want to quit this application?',4+32,'Confirm action')
IF nResponse=6
    CLEAR EVENTS
    THISFORM.Release
ENDIF
RETURN
HTH

>I've a problem which probably requires a very simple solution. I've a form with the following code attached to an exit button:
>LOCAL nResponse
>
>nResponse=MESSAGEBOX('Do you want to quit this application?',4+32,'Confirm action')
>IF nResponse=6
>    CLEAR EVENTS
>ENDIF
>THISFORM.Release
>RETURN
>In my MAIN.prg I have;
>if blah()
>    DO myform
>    READ EVENTS
>ELSE
>    * DISPLAY ERROR MESSAGE
>ENDIF
>Why doesn't this properly work? Executable doesn't work either. Execution of 'blah()' works fine, however the form doesn't load.
Previous
Reply
Map
View

Click here to load this message in the networking platform