Microsoft KB Archive/145684

= BUG: ClearSel Method of Slider Sets SelStart Property to -1 =

Article ID: 145684

Article Last Modified on 5/7/2003

-

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 Visual Basic 4.0 Standard Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 32-Bit Enterprise Edition

-



This article was previously published under Q145684



SYMPTOMS
After using the Slider control's ClearSel method, the SelStart property is set to -1. According to the Visual Basic documentation and to the Online Help, the SelStart property should be identical to the Value property after using the ClearSel method.



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
 Start Visual Basic. Start a new project. Form1 is created by default. Add a Slider control to Form1.

Note: With Visual Basic Versions 5.0 and later, you must first reference the Microsoft Windows Common Controls library. Change the SelectRange property of Slider1 to True. From the Run menu, choose Start (ALT, R, S) or press F5 to start the application. Immediately press CTRL+BREAK, select Break from the Run menu, or press the Pause button on the toolbar to pause execution.  The following lines of code will select a range in the Slider control. Type them on separate lines in the Debug window. Slider1.SelStart = 2 Slider1.SelLength = 3 </li>  After visually verifying that the correct range is selected in the slider control, invoke the slider's ClearSel method by typing the following in the Debug window: Slider1.ClearSel </li>  Examine the SelStart property of the slider by typing Print Slider1.SelStart in the Debug window.

According to the documentation, this should return a 0, because the Value property of the slider is 0 by default and has not been changed. However, it instead returns a value of -1. </li></ol>

Additional query words: kbVBp400bug kbVBp500bug kbVBp600bug kbVBp kbdsd kbDSupport kbControl

Keywords: kbbug KB145684

-

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

© Microsoft Corporation. All rights reserved.