Print Page | Close Window

[QUESTION] How changing menu while popped up?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=18900
Printed Date: 16 May 2024 at 2:48am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [QUESTION] How changing menu while popped up?
Posted By: Fabian
Subject: [QUESTION] How changing menu while popped up?
Date 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



Replies:
Posted By: gibra
Date 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


Posted By: Fabian
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net