Microsoft KB Archive/259519

= PRB: Image Control Is Invisible When the Visible Property Is Set to True =

Article ID: 259519

Article Last Modified on 9/4/2002

-

APPLIES TO


 * Microsoft eMbedded Visual Basic 3.0

-



This article was previously published under Q259519



SYMPTOMS
When you place an Image control on a form and set its Visible property to True, the control seems to stay invisible after you run the application in emulation and on the device.



CAUSE
The problem occurs because the Form and the Image control have the same default background color. The Visible property of the Image control is actually working.



RESOLUTION
To resolve the problem, change the background color of the Form. However, this solution only works for the Palm-size PC and the Handheld PC/Pro. On the Pocket PC, if you change the background color of the Form, it still does not show the Image control although its Visible property is actually True. To solve this, you can assign its Picture property to a bitmap and the Image control then becomes visible.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
 Start a new eMbedded Visual Basic project. Form1 is created by default. On the Project menu, select Components, and then select Microsoft CE Image Control 3.0. Add an Image control (ImageCtl1) to the form and set its Visible property to False.  Add the following code: Private Sub Form_Click MsgBox ImageCtl1.Visible ImageCtl1.Visible = True MsgBox ImageCtl1.Visible End Sub  Run the project in emulation. Click the Form, and note that the first message box displays False, and the second message box displays True. However, the Image control stays invisible.</li></ol>

Keywords: kbprb KB259519

-

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

© Microsoft Corporation. All rights reserved.