>>>>I have a top-level form (ShowWindow=2) that is designed to be run inside the VFP Development environment. On this form I have a command button that allows the user to open a form for edit: the command button Click method executes:
>>>>
>>>>...
>>>>MODIFY FORM (lcFormName)
>>>>
>>>>This opens the form in the main VFP screen; however, the associated toolbars (Form Designer, Form Controls, etc.) are opened in the Top-level form and not in the main VFP screen. I have tried the following in the click method:
>>>>
>>>>...
>>>>_SCREEN.Activate()
>>>>MODIFIY FORM (lcFormName)
>>>>
>>>>But the effect is the same: toolbars are in the Top-level form. Does someone know how to force the toolbars to be opened in the main VFP screen?
>>>
>>>try
>>>
>>>ACTIVATE WINDOW SCREEN
>>>MODIFIY FORM (lcFormName)
>>
>>
>>Works like a champ -- thanks. I find it curious that the _screen.Activate() method did not do the same thing.
>Calling an event (like .Activate) doesn't invoke the event, it merely calls any code that's there. For _SCREEN, there's more than likely no code there at all. You'd have to use RAISEEVENT() to trigger the actual event firing.
Yes, I realized that after thinking about the event vs. method. Had I called _Screen.Show() method it would have worked the same as ACTIVATE WINDOW SCREEN. The goal is to make the _screen the current window output and an event method will not do it -- destinction between methods that do something and events that react to something.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only