Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining active page frame
Message
 
 
To
30/08/2001 11:35:10
Larry Huisingh
Lockheed Martin Information Technology
Richland, Washington, United States
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00550904
Message ID:
00550912
Views:
20
>I have seen references to the ActiveForm property as well as the ActivePage property. Is there such a thing as ActivePageFrame? I want to be able to loop through all the objects in a page on a page frame without having to know the actual page frame name. For now I have to have code with the specific frame name hard coded as in
>
>
>WITH _SCREEN.ActiveForm.pfrData.Pages(_SCREEN.ActiveForm.pfrData.ActivePage)
>  For lCtlNum = 1 TO .CONTROLCOUNT
>    ..Code that checks each control
>  EndFor
>ENDWITH
>
>
>Any suggestions? Have I missed something obvious?

Larry,
You might be able to use the ActiveControl property of the ActiveForm. This holds an object reference to the currently active control. If the control is on one of the pages, you can get its grand parent (pageframe) by using the ActiveControl.Parent.Parent. If the baseclass of the ActiveControl is a Page, you only have to go to the Parent level.

With containership you may have to drill out until you find the pageframe. If you drill out and find the form first, you know there was no active pageframe because the user was not in the pageframe.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform