Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - [QUESTION] Commandbars Contextmenu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[QUESTION] Commandbars Contextmenu

 Post Reply Post Reply
Author
Message
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Topic: [QUESTION] Commandbars Contextmenu
    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 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....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

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

Language: Visual Basic 6.0 SP6

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.234 seconds.