FIX: Wrong Menu Click Event After Hiding MenuLast reviewed: October 30, 1997Article ID: Q99872  | 
	
| 
	
 
1.00 2.00 3.00
WINDOWS
kbprg kbbuglist
 The information in this article applies to: - Standard and Professional Editions of Microsoft Visual Basic for Windows, versions 2.0 and 3.0- Microsoft Visual Basic programming system for Windows, version 1.0 
 SYMPTOMSThe wrong menu Click event is executed after hiding and showing menu items in Visual Basic. 
 CAUSEThis problem occurs when a menu is made invisible before another menu item is made visible. 
 WORKAROUNDChange the order followed to make menus visible and invisible. For example replace the following code (listed in step 4 in the More Information section below): 
    Sub Command1_Click ()
      MnuFile.Visible = 0
      MnuEdit.Visible = -1
   End Sub
   Sub Command2_Click ()
      MnuEdit.Visible = 0
      MnuFile.Visible = -1
   End Sub
with this code:
    Sub Command1_Click ()
      MnuEdit.Visible = -1
      MnuFile.Visible = 0
   End Sub
   Sub Command2_Click ()
      MnuFile.Visible = -1
      MnuEdit.Visible = 0
   End Sub
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem has been corrected in Visual Basic version 4.0. 
 MORE INFORMATION
 Steps to Reproduce Problem
 
  | 
	
	Additional reference words: buglist1.00 buglist2.00 buglist3.00 1.00 2.00 
 © 1998 Microsoft Corporation. All rights reserved. Terms of Use.  |