Microsoft KB Archive/158757

= FIX: TabPicture Property of SSTab Control Gives an OLE Error =

Article ID: 158757

Article Last Modified on 2/16/2005

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition

-



This article was previously published under Q158757



SYMPTOMS
When you use the TabPicture property of the SSTab control, the following error message appears:

OLE error code 0x8002000e: Invalid number of parameters

The TabPicture property set the bitmap or icon so that it appears on the specified tab of an SSTab control.



WORKAROUND
Use the Tab property to set the current tab. Use the Picture property to set the graphic you want to display: ThisForm.Olecontrol1.Object.Tab = 1 ThisForm.Olecontrol1.Object.Picture = LoadPicture(Home+"fox.bmp")



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in FoxPro 5.0a and 6.0.



Steps to Reproduce Behavior
 Create a new form. Place an OLE Container Control on the form. From the Insert Object dialog box, click Insert Control. From the Object Type list, select SSTab Object. (If you have Visual Basic installed, you may see it listed as Sheridan Tabbed Dialog Control.) Place a command button on the form.  Add the following code to the click event of the command button: ThisForm.Olecontrol1.Object.TabPicture(1) = ; LoadPicture(Home+"fox.bmp") </li> Save and run the form.</li> Click the command button.

If you want to use the workaround, replace the code in step 6 with the example code in the WORKAROUND section.</li></ol>

<div class="references_section">