Microsoft KB Archive/191898

= BUG: Windowless TextBox Contents Highlighted After Drag & Drop =

Article ID: 191898

Article Last Modified on 1/8/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q191898



SYMPTOMS
A Visual Basic program contains a windowless TextBox. After you drag-and-drop the TextBox, passing the cursor over the TextBox results in highlighting the TextBox contents.



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 the Microsoft Windowless Controls 6.0 by completing the following steps:

 From the Project menu, select Components to display the Components dialog box. From the Controls tab, select Microsoft Windowless Controls 6.0. Click OK to close the Components dialog box. </li> Add a windowless TextBox control, WLText1, to Form1.</li> Add a standard VB TextBox control, Text1, to Form1.</li>  Copy the following to the Code window of Form1: Option Explicit

Private Sub WLText1_MouseMove(Button As Integer, _                                   Shift As Integer, _                                    X As Single, _                                    Y As Single) If Button <> vbLeftButton Then Exit Sub WLText1.Drag End Sub

Private Sub Text1_MouseMove(Button As Integer, _                                Shift As Integer, _                                 X As Single, _                                 Y As Single) If Button <> vbLeftButton Then Exit Sub Text1.Drag End Sub </li> On the Run menu, select Start, or press the F5 key to start the program. Drag-and-drop the windowless TextBox. Now pass the cursor over the text of the windowless TextBox. The TextBox contents are highlighted.</li> Try the same thing with the standard Visual Basic TextBox and note that the bug does not occur with this control.</li></ol>

Additional query words: kbDSupport kbDSD kbVBp kbCtrl kbVBp600bug

Keywords: kbbug KB191898

-

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

© Microsoft Corporation. All rights reserved.