PRB: eVB: Raising SIP Erases Items Drawn or Printed on a Form (262410)



The information in this article applies to:

  • Microsoft eMbedded Visual Basic 3.0

This article was previously published under Q262410

SYMPTOMS

Raising the Soft Input Panel (SIP) when running a Windows CE for the Pocket PC or Windows CE Palm-size PC 1.2 project erases items drawn or printed on the form. This behavior occurs on the device with both project types; however, it only happens with the Pocket PC project in emulation.

CAUSE

Raising the SIP causes the form to repaint. If the AutoRedraw property of the form is set to True, then the form is repainted. When the form is redrawn, only items that were drawn or printed on the form when the AutoRedraw property was set to True are repainted.

RESOLUTION

Set the AutoRedraw property of the form to True when you are drawing or printing items directly onto a form.

STATUS

This behavior is by design.

MORE INFORMATION

  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 a CommandButton control to Form1.
  4. Paste the following code into Form1:
    Option Explicit
    
    Private Sub Command1_Click()
        Form1.DrawLine 0, 0, 1000, 1000, vbBlack
        Form1.DrawCircle 1250, 500, 200, vbBlack
        Form1.CurrentX = 1500
        Form1.CurrentY = 1000
        Print "Hello"
    End Sub
    
    Private Sub Form_OKClick()
        App.End
    End Sub
    					
  5. Run the project in emulation or on the device.
  6. Click on Command1, and note that a line, a circle, and the word "Hello" appear on Form1.
  7. Raise the SIP, and note that everything on Form1 disappears.

Modification Type:MajorLast Reviewed:9/4/2002
Keywords:kbDSupport kbprb KB262410