Microsoft KB Archive/80023

= BUG: Click Event May Fail to Occur in Cascading Menu =

Article ID: 80023

Article Last Modified on 12/12/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 1.0 Standard Edition

-



This article was previously published under Q80023



SYMPTOMS
There is an inconsistency with the Click events of cascading menus in Visual Basic. This problem occurs when hidden menus are displayed.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
If you design menus with cascading menus, you can process the Click event for the menu selection that cascades another submenu. Conversely, if you initially design the menu so that the menu Visible property is set to False, you will not always be able to process the Click event for that menu selection that cascades another menu.

Steps to Reproduce Problem
  From the menu design dialog box of Visual Basic (VB.EXE), create a set of menus using the following table as a guide:   Caption     CtlName (or Name)  Level   Visible --  A           MID_A               1        True 1          MID_ONE             2 Cascade 1  CASCADE1            3 B          MID_B               1        False 2          MID_TWO             2 Cascade 2  CASCADE2            3  Add two command buttons (Command1 and Command2) to the form.  Add the following code to your program in the appropriate places: Sub Command1_Click MID_A.Visible = -1 MID_B.Visible = 0 End Sub

Sub Command2_Click MID_A.Visible = 0 MID_B.Visible = -1 End Sub

Sub MID_TWO_Click Print &quot;Cascade 2&quot; End Sub

Sub MID_ONE_Click Print &quot;Cascade 1&quot; End Sub  Run the program. Click the A menu, then click the 1 menu. Notice that &quot;Cascade 1&quot; is printed to the form. Note that you may have to do this twice because the menu overlaps the display and erases most of it the first time. Click the Command2 button to hide the A menu and show the B menu. Click the B menu, then click the 2 menu. Notice &quot;Cascade 2&quot; does not print to the screen as it did in step 5 above.</li></ol>

Additional query words: buglist1.00 buglist2.00 buglist3.00 2.00 3.00

Keywords: kbbug KB80023

-

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

© Microsoft Corporation. All rights reserved.