BUG: Lines Drawn on Form Disappear After Menu Covers Them

ID: Q180496


The information in this article applies to:
  • Microsoft Windows CE Toolkit for Visual Basic 6.0
  • Microsoft Windows CE Toolkit for Visual Basic 5.0


SYMPTOMS

When a menu drops down and covers lines drawn directly on a form, the line that is covered will not be repainted correctly.


RESOLUTION

To avoid this problem, redraw the line in the Click event of the submenu. For example, if you have a File menu with a submenu named "New," add the following code for the "New" submenu Click event:


   Private Sub mnuNew_Click()
      'Normal New menu code here
      Drawline 0,0,1000,1000   'Redraw line.
   End Sub 


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Windows CE (HPC) Project in Visual Basic. Form1 is created by default.


  2. Add a menu with submenus to Form1.


  3. Add a CommandButton to Form1.


  4. Add the following code to Form1:
    
           Private Sub Command1_Click()
               DrawLine 0, 0, 1000, 1000
           End Sub 


  5. Press the F5 key to run the project.


  6. Click on the CommandButton to draw a line.


  7. Select an option on the submenu and note that the region with the drawn line occupied by the submenu does not get repainted.


Additional query words: wce vbce vbce5 vbce6

Keywords : kbToolkit kbVBp500bug kbVBp600bug kbWinCE100 kbGrpVB
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: March 12, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.