DOCUMENT:Q190520 07-AUG-1998 [vbwin] TITLE :BUG: ScrollBars Disappear on Mouse Move in OLE Container PRODUCT :Microsoft Visual Basic for Windows PROD/VER: OPER/SYS:WINDOWS KEYWORDS: ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, versions 5.0, 6.0 - Microsoft Word 97 for Windows --------------------------------------------------------------------- SYMPTOMS ======== When editing a Microsoft Word Document in the Visual Basic OLE Container, the horizontal and vertical ScrollBars for the Word Document disappear on mouse movement and/or clicks. STATUS ====== Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATION ================ Steps to Reproduce Behavior --------------------------- 1. Start a new Standard EXE project in Visual Basic. Form1 is created by default. 2. Add an OLE Container and a CommandButton to Form1. Click Cancel if prompted for an object type. 3. Add the following code to Form1's code window: Option Explicit Private Sub Command1_Click() OLE1.CreateEmbed "", "Word.Document" OLE1.DoVerb vbOLEUIActivate OLE1.SizeMode = 1 With OLE1.object .ActiveWindow.DisplayVerticalScrollbar = True .ActiveWindow.DisplayHorizontalScrollbar = True End With End Sub 4. Run the project by pressing the F5 key. 5. Click Command1 to embed a new word document in the container. The code will automatically activate the document and show the ScrollBars. 6. Type "Hello World" in the document. 7. Start moving the mouse around and/or click the start of the document. You should notice that the ScrollBars disappear shortly upon receiving these mouse events. REFERENCES ========== For additional information, please see the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q147804 TITLE : HOWTO: Scroll an Embedded Word 6 Document in VB OLE Additional query words: kbDSupport kbDSD kbVBp kbCtrl kbVBp600bug kbVBp500bug ====================================================================== Platform : WINDOWS Issue type : kbbug ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1998.