DOCUMENT:Q195235 04-NOV-1998 [vbwin] TITLE :BUG: Caret Disappears After Tabbing From a Windowless TextBox PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:6.0 OPER/SYS:WINDOWS KEYWORDS:kbVBp kbCtrl kbVBp600bug ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 6.0 --------------------------------------------------------------------- SYMPTOMS ======== When you shift focus from a Windowless TextBox on a Windowless UserControl to a standard TextBox on a form, the caret is not visible in the form's TextBox. The form's TextBox has the focus and the keyboard input will be directed to the TextBox, but the caret is not present. RESOLUTION ========== Resolution #1 ------------- Set the Windowless property of the UserControl to False. Resolution #2 ------------- Invoke the SetFocus method in the GotFocus event of the TextBox. For example: Private Sub Text1_GotFocus() Me.SetFocus End Sub STATUS ====== Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATION ================ Steps to Reproduce Behavior --------------------------- 1. Start a Standard EXE project in Visual Basic. Form1 is created by default. 2. Choose Components from the Project menu, check "Microsoft Windowless Controls 6.0," and click OK. 3. From the Project menu, add a new UserControl to the project. 4. Set the Windowless property of the UserControl to True. 5. Add a Windowless TextBox to the UserControl. 6. Close the UserControl window, and add an instance of the UserControl to Form1. 7. Add a standard TextBox to Form1. 8. Run the project. The caret should appear in the UserControl's TextBox. 9. Press the TAB key, or click on the form's Textbox. Note that the caret does not appear, although the TextBox will accept keyboard input. REFERENCES ========== For additional information, please see the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q189950 TITLE : HOWTO: Install the Microsoft Windowless Controls for VB6 Additional query words: ====================================================================== Keywords : kbVBp kbCtrl kbVBp600bug Version : WINDOWS:6.0 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.