PRB: Repaint Problem with Btnmenu.ocx with Internet Explorer (250518)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 4.0
  • Microsoft Internet Explorer (Programming) 4.01
  • Microsoft Internet Explorer (Programming) 4.01 SP1
  • Microsoft Internet Explorer (Programming) 4.01 SP2
  • Microsoft Internet Explorer (Programming) 5
  • Microsoft Internet Explorer (Programming) 5.01

This article was previously published under Q250518

SYMPTOMS

When you load Btnmenu.ocx on a Web page, Internet Explorer will render the control correctly the first time. However, Internet Explorer might have problems repainting the control after you reload the page. Nevertheless, you can still invoke the methods of Btnmenu.ocx.

RESOLUTION

Btnmenu.ocx was originally included with Internet Explorer 3.0. This control is considered obsolete and is no longer supported. The preferred method to achieve the same functionality is to use Dynamic HTML and cascading style sheets.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a html page called Start.htm with the following code:
    <HTML>
    <BODY>
    <SCRIPT LANGUAGE="JScript">
    function OpenWindow()
    {
     window.open("ShowMenu.htm");
    
    }
    </SCRIPT>
    
    <INPUT TYPE="BUTTON" onClick="OpenWindow();" VALUE="Open Window">
    </BODY>
    </HTML>
    
    					
  2. Create another html page called ShowMenu.htm with the following code:
    <HTML>
    <BODY>
    <SCRIPT LANGUAGE="JScript">
    function ShowAbove()
    {
    	BtnMenu1.AboutBox();
    }
    </SCRIPT>
    
    <OBJECT ID=BtnMenu1 CLASSID="clsid:52DFAE60-CEBF-11CF-A3A9-00A0C9034920" 
             CODEBASE="http://activex.microsoft.com/controls/iexplorer/x86/btnmenu.cab#version=4,71,115,0"
             WIDTH=80 HEIGHT=25 ALIGN=MIDDLE>
             <PARAM NAME="Caption" VALUE="Menu">
             <PARAM NAME="Menuitem[0]" VALUE="Item1">
             <PARAM NAME="Menuitem[1]" VALUE="Item2">
             <PARAM NAME="Menuitem[2]" VALUE="Item3">
             <PARAM NAME="Menuitem[3]" VALUE="Item4">
             <PARAM NAME="Menuitem[4]" VALUE="">
             <PARAM NAME="Menuitem[5]" VALUE="Item6">
       </OBJECT>
    <INPUT TYPE="BUTTON" onClick="ShowAbove();" VALUE="Show About Box">
    <INPUT TYPE="BUTTON" onClick="self.close();" VALUE="Close Window">
    </BODY>
    </HTML>
    					
  3. Navigate to Start.htm with Internet Explorer.
  4. Click Open Window to open another Internet Explorer Window.
  5. After the installation of Btnmenu.ocx, you will see that the control comes up correctly, and you could click on the control to see the menu items.
  6. Click Close Window to close this window.
  7. Click Open Window at the Start.htm page again.
  8. This time, the Btnmenu.ocx control does not appear in the Internet Explorer window. However, if you click on Show About Box, a message box will appear displaying information about Btnmenu.ocx.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site: For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:

REFERENCES

For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites: (c) Microsoft Corporation 2000, All Rights Reserved. Contributions by Joshua Lee, Microsoft Corporation.


Modification Type:MajorLast Reviewed:5/11/2006
Keywords:kbCtrl kbprb kbSBNWorkshop KB250518