Microsoft KB Archive/190520

= BUG: ScrollBars Disappear on Mouse Move in OLE Container =

Article ID: 190520

Article Last Modified on 1/23/2007

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Learning Edition
 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition
 * Microsoft Word 2002 Standard Edition
 * Microsoft Word 2000 Standard Edition
 * Microsoft Word 97 Standard Edition

-



This article was previously published under Q190520



SYMPTOMS
When editing a Microsoft Word Document in the Microsoft 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.



Steps to Reproduce Behavior
 Start a new Standard EXE project in Visual Basic. Form1 is created by default. Add an OLE Container and a CommandButton to Form1. Click Cancel if prompted for an object type.  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  Run the project by pressing the F5 key. Click Command1 to embed a new word document in the container. The code automatically activates the document and shows the ScrollBars. Type "Hello World" in the document.</li> 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.</li></ol>

<div class="references_section">