DOCUMENT:Q192648 14-SEP-1998 [vbwin] TITLE :BUG: Frame Disappears with Transparent Windowless Control PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:6.0 OPER/SYS:WINDOWS KEYWORDS: ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 6.0 --------------------------------------------------------------------- SYMPTOMS ======== When adding a transparent, windowless UserControl to a standard Frame control in Visual Basic 6.0, the border and caption of the Frame control may disappear in both the IDE and at run-time. 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. Create a new Standard EXE project. Form1 is created by default. 2. Add a new UserControl from the Project menu. Set the BackStyle property to Transparent and the Windowless property to True. 3. Place a Shape control on the UserControl, then add the following code to the UserControl's code window: Private Sub UserControl_Initialize() Shape1.BackStyle = 1 'Opaque Shape1.Shape = 2 'Oval End Sub Private Sub UserControl_Resize() Shape1.Move 0, 0, UserControl.Width, UserControl.Height End Sub 4. Close the UserControl designer. 5. Add a Frame control to Form1. 6. Add your UserControl to Frame1. 7. Press the F5 key to run the program and note that the border and caption of the frame control disappear. REFERENCES ========== For additional information, please see the following articles in the Microsoft Knowledge Base: ARTICLE-ID: Q188234 TITLE : PRB: Cannot Move Windowless Controls on Form ARTICLE-ID: Q188544 TITLE : BUG: Transparent Windowless UserControl Cannot Be Dragged Additional query words: kbDSupport kbDSD kbVBp kbVBp600bug kbCtrlCreate ====================================================================== 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.