Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a from from a command button
Message
From
27/10/1998 16:04:47
 
 
To
27/10/1998 09:19:58
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00150720
Message ID:
00151257
Views:
32
>Calling a subform from a cmd and return to main form works fine if the subform is modal. Do you really need it to be modeless? Why then are you hidding the main form?
>
>
>>Mike,
>> I have Form A that hides itself before it calls Form B with the hide windows all command. After I call the Release() method in Form B I show windows all command and works fine for me.
>>
>>Mark
>>
>>>>Hi, Mike.
>>>>Does it help to set the toplevel form as invisible when you do the called form
>>>>and reset it visible when the called form is released? They need to be desktop forms, right? Not sure about in 6.0...
>>>>
>>>>
>>>>>
>>>>>1. User clicks pushbutton on top level form.
>>>>>2. Top level form disappears, focus goes to and remains on
>>>>> modeless called form until called form is released.
>>>>>3. Top level form reappears and receives focus.
>>>>>
>>>
>>>I just tried that and it didn't work. The problem is that execution continues on past the DO FORM command in the calling form, regardless of whether I hide() the calling form or set it's visible property to .F.
>>>
>>>I have just about decided to have the top level form release itself after it calls the subform, and have the subform reinvoke the top level form when it exits. i.e. FORM A has a DO FORM B in its button click code and then does a ThisForm.Release(), FORM B has a DO FORM A in its Destroy method.
>>>
>>>I'm just hoping someone will tell me there is a better way.

I hide the main form because the processes you can choose from it are essentially modeless, see my other response. As for running it modal, welll I've just gotten used to using _MSYSMENU as a repository for conditional Hot/function keys, and hate to give it up. (F5 for modi Memo features, F2 for lookups based on Activecontrol, that sort of thing...).
Previous
Reply
Map
View

Click here to load this message in the networking platform