Microsoft KB Archive/97588

= FIX: Mouse Misbehaves After Changing Graph Visible Property =

Article ID: 97588

Article Last Modified on 1/8/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Professional Edition

-



This article was previously published under Q97588



SYMPTOMS
If you set the Visible property of a graph control (GRAPH.VBX) to False from the Change event of a scroll bar, the mouse behaves as if its button is being held down even after you release it.



STATUS
Microsoft has confirmed this to be a bug in the Professional Edition of Microsoft Visual Basic version 2.0 for Windows. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.



Steps to Reproduce Problem
 Start Visual Basic or from the File menu, choose New Project (ALT, F, N) if Visual Basic is already running. Form1 is created by default. From the File menu, choose Add File. In the Files box, select the GRAPH.VBX custom control file. Place a horizontal scroll bar named HScroll1 on Form1. Set the Maximum property to 3. Add four graphs to Form1 using the same name for each one to make it into a control array.  Add the following code to the Form_Load event: Sub Form_Load Graph1(0).Visible = True Graph1(1).Visible = False Graph1(2).Visible = False Graph1(3).Visible = False End Sub   Add the following code to the HScroll1_Change event: Sub HScroll1_Change For i = 0 To 3 ' Set graph Visible property to true if i matches scroll var value ' otherwise to false. Graph1(i).Visible = (i = HScroll1.Value) Next End Sub </li> Run the program. Click the scroll bar right arrow without moving the mouse pointer away. Instead of displaying the next graph control in the control array, the program incorrectly scrolls through all the graph controls leaving the scroll bar at its maximum value.</li></ol>

Additional query words: buglist2.00 fixlist3.00 2.00 3.00

Keywords: kbbug kbfix KB97588

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.