Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Know the name tthe form1 that call form 2
Message
 
To
24/05/2002 06:14:05
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00660923
Message ID:
00660951
Views:
10
This message has been marked as a message which has helped to the initial question of the thread.
>You can pass as parameter calling form name. In Init event of form3 you will know caller form name.
>Another possibility is to set global flag with caller form name. You can check this flag on the Load event (if Init is too late for you).

There is also another trick. :)

When you run one form from another, in Init() of the child form you may access the properties and methods of the parent form directly, without passing the parameters - i.e:
thisform.someProperty =_screen.activeform.Name
or
thisform.someControl.Value =_screen.activeform.someControl.Value
This is based on the fact that when the child form runs its .Init() it is not an Activeform yet, because its .Activate() didn't fire so far, so the calling form still stays active at that time.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform