Microsoft KB Archive/260120

= BUG: eVB - Cannot See Control Under Transparent Label =

Article ID: 260120

Article Last Modified on 10/15/2002

-

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.



Steps to Reproduce Behavior
 Open Microsoft eMbedded Visual Basic 3.0. Create a new Windows CE for the Pocket PC project. Form1 is created by default. Add two Label controls and a CommandButton control to Form1.  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 = &quot;Top Label&quot; Label2.Caption = &quot;Bottom Label&quot; Command1.Caption = &quot;Make Label1 Transparent&quot; 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  Run the application and note that Label1 (Red) is covering Label2 (Blue). Click on the CommandButton with the caption &quot;Make Label1 Transparent.&quot; 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.</li></ol>

Additional query words: wce evb

Keywords: kbbug kbpending KB260120

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.