Microsoft KB Archive/166139

= How To Display Graphic on Each Tab of SSTab at Runtime =

Article ID: 166139

Article Last Modified on 7/1/2004

-

APPLIES TO


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

-



This article was previously published under Q166139



SUMMARY
This article explains how you can display a graphic on each tab of a SSTab ActiveX control at run time.



MORE INFORMATION
The SSTab control is an ActiveX control that ships with Visual FoxPro 5.x. The SSTab control provides a group of tabs, each of which acts as a container for other controls.

The steps below demonstrate how to create an example of one of these controls:

 Create a form. Add the SSTab ActiveX control to the form. By default, SSTab always has three pages. Change the name of the control from Olecontrol1 to SStab1. Add a Command button to the form and change the Caption property to "Set Picture."  In the Click method of the Command button, put in the following code: FOR cPage = 0 to 2 THISFORM.SSTab1.Object.Tab = cPage  &&select the current page THISFORM.SSTab1.Object.Picture = ; LoadPicture(home+"samples\graphics\bmps\outline\leaf.bmp") ** In Visual FoxPro 6.0, change the LoadPicture function to: ** LoadPicture(Home+"Fox.bmp") ENDFOR THISFORM.SSTab1.Object.Tab = 0  Save and run the form.</ol>

When the form is running, click on the Command button to display the graphic on each tab.

NOTE: Remember, the tab in SSTab ActiveX control always begins with 0.

The Picture property of the SSTab control requires an object reference, and the LoadPicture function returns an object reference to the graphic file.

The LoadPicture function supports the bitmap (.bmp), icon (.ico), or Windows metafile (.wmf) graphical formats.

Keywords: kbhowto KB166139

-

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

© Microsoft Corporation. All rights reserved.