PRB: Top Level Menu Items Do Not Generate Click Events

ID: Q180436


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


SYMPTOMS

The Click event is not fired when a top-level menu item is clicked. Note that this is only true for the top-level menu items. Any code that is placed in this event will not be executed and will need to be placed in another event.


STATUS

This behavior is by design.


MORE INFORMATION

Windows CE version 2.0 does not support top-level menu items without sub-items.

Steps to Reproduce Behavior

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


  2. Right-click on Form1, and select the Menu Editor from the shortcut menu.


  3. Change the following properties:

    Caption = Test
    Name = mnuTest


  4. Click OK.


  5. Add the following code to the project:

    
          Private Sub mnuTest_Click()
             MsgBox "Test"
          End Sub 



  6. Press the F5 key to run the project.

    NOTE: If you're using the Windows CE Toolkit for Visual Basic 6.0, the following message will appear:

    "Your project specifies a top level menu item mnutest, which has no sub items. This is not supported in Windows CE."


  7. In Windows CE Toolkit for Visual Basic 5.0, click the "Test" menu, and note that the Click event did not fire.


Additional query words: wince vbce vbce5 vbce6

Keywords : kbToolkit kbVBp kbVBp500bug kbVBp600fix kbWinCE kbWinCE100 kbGrpVB
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbprb


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