BUG: eVB - Cannot See Control Under Transparent Label (260120)



The information in this article applies to:

  • Microsoft eMbedded Visual Basic 3.0

This article was previously published under Q260120

SYMPTOMS

Setting the BackStyle property of a Label control to transparent (0) does not allow you to see controls under it in Z order at run time. You are able to see the background of the form on which the label was sited.

This problem occurs in emulation and on the Pocket PC device. The problem does not occur at design time.

STATUS

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

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open Microsoft eMbedded Visual Basic 3.0.
  2. Create a new Windows CE for the Pocket PC project. Form1 is created by default.
  3. Add two Label controls and a CommandButton control to Form1.
  4. Paste the following code into Form1:
    Private Sub Form_Load()
            Label1.Top = 100
            Label2.Top = 100
            Label1.Left = 120
            Label2.Left = 900
            Label1.Width = 2000
            Label2.Width = 2000
            Label1.Height = 500
            Label2.Height = 500
            Label1.BackColor = vbRed
            Label2.BackColor = vbBlue
            Label1.Caption = "Top Label"
            Label2.Caption = "Bottom Label"
            Command1.Caption = "Make Label1 Transparent"
            Label1.ZOrder (0) 'Move Label1 to Top
            Command1.Top = 610
            Command1.Left = 900 'Align command button on left with Label2
    End Sub
    
    Private Sub Command1_Click()
            Label1.BackStyle = 0
    End Sub
    					
  5. Run the application and note that Label1 (Red) is covering Label2 (Blue).
  6. Click on the CommandButton with the caption "Make Label1 Transparent." You should be able to see the portion of Label2 that is directly under Label1. Instead you see the background of the form on which Label1 is sited. If you set the BackStyle property to 0 at design time, you can see Label2 correctly displayed. However, when you run the application, Label2 is not completely visible. This problem occurs in emulation and on the Pocket PC device.

Modification Type:MajorLast Reviewed:10/15/2002
Keywords:kbBug kbDSupport KB260120