Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Waiting on a Modeless form
Message
From
25/05/2005 07:14:29
Irv Adams
MSC Managed Care, Inc.
Florida, United States
 
 
To
24/05/2005 16:26:22
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01017199
Message ID:
01017432
Views:
19
>>To All:
>>
>>Is there an elegant way to wait for a modeless form to finish before the code continues? It's a top-level calling a top-level form. The called form does some calculations and returns (or sets) some values.
>>
>>I can think of a way by pausing execution, but wondered if there were others.
>>
>>TIA,
>
>First, why don't you uses a Desktop in-Top Modal ?
>
>Second, modeless Form is a async coding,
>then callback is the master road:
>
>* run pre code
>* create modeless top form
>* set a wait callback event for topForm unload
>* bindevent(topForm,"UnLoad",m.thisForm,"CallBack",1)
>* don't forget to add a character to the topForm's Unload method
>* put the rest of the code int othe thisform.Calback
>
>Of course it demands that not there are scope ties.


Fabio,

I didn't use the Desktop in-TopLevel Modal just because I like the appearance and flexibility of standalone windows. It could of course be done that way if necessary.

I'm interested in your potential solution, let me see if I have this clearly:

1) Bind the Unload event of the called Form to a method of the caller.
2) Place the code that used to run immediately after the call into this method. As long as there are no timing issues, this should work.

This is a good idea, I may try it. Thanks,

-Irv.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform