Microsoft KB Archive/192648

= FIX: Frame Disappears With Transparent Windowless Control =

Article ID: 192648

Article Last Modified on 3/3/2005

-

APPLIES TO


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

-



This article was previously published under Q192648



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 might disappear in both the IDE and at run-time.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3.

For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed



Steps to Reproduce Behavior
 Create a new Standard EXE project. Form1 is created by default. Add a new UserControl from the Project menu. Set the BackStyle property to Transparent and the Windowless property to True.  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  Close the UserControl designer. Add a Frame control to Form1. Add your UserControl to Frame1.</li> Press the F5 key to run the program and note that the border and caption of the frame control disappear.</li></ol>

<div class="references_section">