FIX: Frame Disappears With Transparent Windowless Control (192648)



The information in this article applies to:

  • Microsoft Visual Basic Learning Edition for Windows 6.0
  • Microsoft Visual Basic Professional Edition for Windows 6.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0

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

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

188544 BUG: Transparent Windowless UserControl Cannot Be Dragged

Modification Type:MinorLast Reviewed:3/3/2005
Keywords:kbBug kbCtrlCreate kbfix kbVS600sp3fix KB192648