Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Release a form
Message
 
À
07/05/2007 14:55:53
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01223016
Message ID:
01223173
Vues:
17
Thanks folks.
I think the isea of hiding the form, releasing and c\alling should work fine.
regards,
Gerard





>>>>Hi.
>>>>On a click of a button, I want to rlease the existing form and call another form, so that when the called from is in focus, the calling form has been released.
>>>
>>>If the button is on the calling form, you just can't get things to happen in that order. You can do
>>>
thisform.release()
>>>do form OtherForm
>>>but that code would run in an object on the calling form, which then can't release as long as any of its code is still running. So the expected order of events is not achieved - your other form will show, then the caller form will release. May happen just as fast so it may look instantaneous, but if the second form is slow to load, or the first is slow to die, you may see them both for a while.
>>>
>>>The solution would be simple - don't put the button on the form, put it somewhere else. As Ed said, you can do that in any forms manager.
>>>
>>>Another solution for this would be to have a wizard interface. Instead of killing one form and launching another, why not have a tabless pageframe, so the first page contains whatever your first form had, and the second one what the other had. The button is on the first page, and it only sets thisform.pageframe.activepage=2. You don't even have to close/open tables, everything's set already.
>>
>>I was thinking, that you can hide the main form, do the second form and then release the main form.
>
>Hey, that's right - how didn't I think of that? :)
>So the above code becomes:
>
thisform.hide()
>thisform.release()
>do form OtherForm
>
>The caller form will still release after all this code runs, but it will become invisible after first line, and it'll look right as the originator of this thread wanted.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform