![]()  | 
 
[QUESTION] How changing menu while popped up? | 
 
    Post Reply  
   | 
  
| Author | |
   
   Fabian  
   
   Senior Member  
   Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: [QUESTION] How changing menu while popped up?Posted: 03 September 2011 at 10:32am  | 
 
| 
   
    
   Hi all, 
 
   
  I try to change the caption of a menu command while the menu is popped up (background: I should change the caption as soon as the shift key was pressed). I capture the key code with GetAsyncKeyState() in the Update event of the commadbar. As you can see in the picture, the command in the command bar works as expected, but not the command in the menu 
![]() It seems, that the update event wouldn't be fired for popped up menus... Probably there is an other event to try but I doesn't found the right way. 
Thankfull for any idea! 
Fabian 
    | 
 |
| 
   
     
     Product: Xtreme SuitePro (ActiveX) version 16.2.3  
   
  Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6  | 
 |
![]()  | 
 |
   
   gibra  
   
   Senior Member  
   Joined: 31 October 2008 Location: Italy Status: Offline Points: 288  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 03 September 2011 at 5:57pm | 
 
| 
   
    
   Show code you use.
    
   
   | 
 |
| 
   
     
     gibra 
   
  CJ SuiteControl v: 13.x to 19.x Windows 10 64bit VS2019 - VB6.0 SP6 <a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8  | 
 |
![]()  | 
 |
   
   Fabian  
   
   Senior Member  
   Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 04 September 2011 at 3:26am | 
 
| 
   
    
   Hi Gibra
 
   
  For testing I simply used the designer sample from CJ and add  
If GetAsyncKeyState(17 AND &H8000) Then 
  Control.Caption = "TEST"  
End If 
to the Update event. I tried also Control.Action.Caption = "TEST", but Action seems not to be supported in the Update event. 
The command placed on a command bar was changed correctly, als the command in the menu if I press the shift key before clicking EDIT, but if the EDIT menu is still popped up the caption doesn't change. 
Regards 
Fabian 
    | 
 |
| 
   
     
     Product: Xtreme SuitePro (ActiveX) version 16.2.3  
   
  Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6  | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |