Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help!! Returning back to the calling form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00261260
Message ID:
00261283
Views:
25
>William,
>
>Your assumption is correct. Currently on the second form, I have the min, max, and cancel options of a screen set to False. I wanted a user to select a button that will allow them to exit the second form and return back to the calling form.
>
>I'm trying to duplicate the cancel button into a command button on the form.

Hi Edgar,

If the form being called is modal (WindowType = 1), execution in the calling form is suspended until the called form is either hidden or released. You can have a modal form return a value, but more typically (I think), this situation is handled something like this:
LOCAL loForm
DO FORM MyForm.SCX NAME loForm LINKED
* The following isn't executed until the form is hidden or released
IF VARTYPE(loForm) = "O" AND NOT ISNULL(loForm)
  * Do whatever, the user didn't cancel.
  * Finally when done
  loForm.Release
ENDIF
If you have a close box (the X in the upper right hand corner) or a Cancel command button that issues ThisForm.Release, the code in the IF...END block won't execute.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform