PRB: Design-Time Properties of ActiveX TabStrip Controls Don't Work in Visual InterDev (274757)



The information in this article applies to:

  • Microsoft Visual InterDev 6.0
  • Microsoft Visual Studio, Enterprise Edition 6.0
  • Microsoft Visual Studio 6.0 SP4

This article was previously published under Q274757

SYMPTOMS

In Visual InterDev, when you use the ActiveX TabStrip controls that are included with Visual Studio, users may experience problems when they try to set the design-time properties of the controls. For example, some properties that are set in the property pages generate errors or do not appear when the page is viewed in the browser, or the property values are not retained when the page is saved.

CAUSE

These controls are not designed for use in the Visual InterDev design environment or in Web pages. Although these controls are available, users encounter limitations in functionality.

RESOLUTION

There are several ways to work around this problem:
  • Use client-side code that is written in Microsoft Visual Basic Scripting Edition (VBScript) or Microsoft JScript in an HTML page. After you add the TabStrip control to the body of the page, set the properties that cannot be set at design-time as follows:
    <HEAD>
    <SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
    <!--
    
    function window_onload() {
        TabStrip1.Tabs.Clear()
        TabStrip1.Tabs.Add(1,"Tab1","My Tab 1")
        TabStrip1.Tabs.Add(2,"Tab2","My Tab 2")
    }
    
    //-->
    </SCRIPT>
    </HEAD>
    <BODY LANGUAGE=javascript onload="return window_onload()">
    					
  • Design custom ActiveX controls in Microsoft Visual Basic or Microsoft Visual C++, or obtain controls from third-party vendors who design controls that work on the Internet.
  • In Visual Basic, create an ActiveX Document application. This allows you to use the TabStrip controls as designed in the Visual Basic development environment. Similar to an ActiveX control, the ActiveX Document is an application that can be downloaded to Microsoft Internet Explorer, installed on the client, and run as part of a Web application over the Internet.
NOTE: Some developers attempt to use the TabStrip control that comes with the Microsoft Forms 2.0 collection (Fm20.dll), which is installed with Microsoft Office. However, this is not recommended because there are client licensing issues; even if these issues are overcome, these controls are designed to be used in Microsoft Office and not in Visual InterDev or on the Web.

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

236458 PRB: Using Microsoft Forms 2.0 in Internet Explorer

MORE INFORMATION

Steps to Reproduce Behavior

  1. In Visual InterDev, create a new Web project, and then add a blank HTML page to the project.
  2. Right-click Toolbox, and then click Customize Toolbox.
  3. On the ActiveX Controls tab, make sure that the following controls are selected:

    • TabStrip Control, Version 6.0 (MSCOMCTL.ocx)
    • SSTab or Microsoft Tabbed Dialogue Control (TABCTL32.ocx)
    If these controls do not appear on the ActiveX Controls tab, click Browse to find these files on your system. They are often in the \Winnt\System32 folder.
  4. Drag the TabStrip control (MSCOMCTL.ocx) to the body of the page.
  5. Right-click the control, and click Properties. Try to add new tabs and set their captions. When you view the page in the browser, the captions do not appear. When you save, close, and then reopen the page, the design-time properties are lost.
The SSTab control exhibits similar behavior when you set tab captions and other properties.

REFERENCES

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:

170770 PRB: Known Problems with ActiveX Controls

236458 PRB: Using Microsoft Forms 2.0 in Internet Explorer


Modification Type:MinorLast Reviewed:8/15/2005
Keywords:kbCtrl kbide kbprb KB274757