Microsoft KB Archive/156104

= How To Hide Focus on an Active Page Tab in a Pageframe =

Article ID: 156104

Article Last Modified on 6/30/2004

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q156104



SUMMARY
In Visual FoxPro 5.0 or later, when a page within a PageFrame control becomes active, the focus is placed on the caption of the tab of the active page. Visual FoxPro versions 3.0 and 3.0b do not exhibit this behavior.



MORE INFORMATION
The following example shows you how to create a PageFrame control and hide the focus on the caption of the tab of the active page:

 Create a form. Place a Container control onto the form, name it "CONTAINER1," and set the following properties in the Properties window:

BORDERWIDTH = 0

LEFT = 60

TOP = 60

WIDTH = 348

HEIGHT = 200

 Right-click the Container control. On the Shortcut menu, click Edit. Place a PageFrame control into the Container control, and name it "PAGEFRAME1." Set the following properties for the PageFrame control in the Properties window:

LEFT = 0

TOP = 0

WIDTH = 348

HEIGHT = 200

 Remove the caption for all pages within the PageFrame control by deleting the value in the Caption property.

You should have a PageFrame control, with no captions for any of the pages, inside a Container control Making sure the Container control is in the Edit mode and not the PageFrame control, place two labels where the deleted captions used to be, and name them "LABEL1" and "LABEL2." Set the Caption property for these two labels to the appropriate value in the Properties window, such as Page1 for LABEL1 and Page2 for LABEL2.  In the Click event of LABEL1, add the following code: THISFORM.CONTAINER1.PAGEFRAME1.ACTIVEPAGE = 1 In the Click event for LABLE2, add the following code: THISFORM.CONTAINER1.PAGEFRAME1.ACTIVEPAGE = 2 </li> Save and run the form.</li></ol>

When you click the tab of the page within the PageFrame control, no focus shows up for the active page tab.

Keywords: kbhowto kbdesigner KB156104

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.