Article ID: 192648 - Last Review: March 3, 2005 - Revision: 2.1

FIX: Frame Disappears With Transparent Windowless Control

This article was previously published under Q192648

On This Page

Expand all | Collapse all

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  (http://support.microsoft.com/kb/194022/EN-US/ ) INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295  (http://support.microsoft.com/kb/194295/EN-US/ ) HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed

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:

188234 PRB: Cannot Move Windowless Controls on Form  (http://support.microsoft.com/kb/188234/EN-US/ )

188544 BUG: Transparent Windowless UserControl Cannot Be Dragged  (http://support.microsoft.com/kb/188544/EN-US/ )

APPLIES TO
  • Microsoft Visual Basic 6.0 Learning Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic 6.0 Enterprise Edition
Keywords: 
kbbug kbfix kbctrlcreate kbvs600sp3fix KB192648
 

Article Translations