Print Page | Close Window

[QUESTION] Commandbars Contextmenu

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=18861
Printed Date: 16 May 2024 at 2:57am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [QUESTION] Commandbars Contextmenu
Posted By: Aaron
Subject: [QUESTION] Commandbars Contextmenu
Date Posted: 24 August 2011 at 12:11pm
Hi,
 
Is it possible to close contextmenu in code? I'm asking this to solve my problem:
 
When holding mouse down on a controlbutton (I'm using ExecuteOnPressInterval option) and moving mouse away from this button and mouse is released over something else besides that button, I would need to close the Contextmenu in code, so user notices he/she doesn't have his/her mouse on the button anymore and current process stops.
 
See attached test project to see what I'm trying to accomplish http://forum.codejock.com/uploads/3701/TestExcutePress.zip - uploads/3701/TestExcutePress.zip
 
 
Thanks a lot in advance
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



Replies:
Posted By: jpbro
Date Posted: 24 August 2011 at 1:36pm
I've thought of a different approach, but I'm not sure it meets all of your requirements. Does this do what you need?

uploads/2676/ExecuteOnMouseHoverOnly.zip - uploads/2676/ExecuteOnMouseHoverOnly.zip



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Aaron
Date Posted: 24 August 2011 at 2:07pm
Hi Jason,
 
Thanks for reply Wink
 
There seems to be something missing... What does DismissCommandBar do ?
 
Maybe I didn't explain properly LOL 
 
  1. Yellow "led" means normal / starting point
  2. Mousedown on controlbutton 'test' > Green 'led'
  3. MouseUp on controlbutton > Yellow 'led' (back to normal)

Now comes the tricky part

    4.   Same as above 1 + 2
    5.   MouseUp somewhere else (except on pushed controlbutton) should return to normal (Yellow 'led'
 
 
Hope I explained it properly
 
Thanks again
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: jpbro
Date Posted: 24 August 2011 at 2:35pm
I see what you need now, but I haven't had much luck getting the code to work.

It seems that all of the CommandBar events that could be useful (ControlSelected, TrackingModeChanged) are fired before Execute is fired, which makes things difficult. You could add a Timer control and check if Not (LeftButtonDown Or CommandBar.Visible), then call CommandBar.ClosePopups and reset the icon, but it is an ugly hack IMHO.

I will try a few more things and get back to you.



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

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