[QUESTION] Commandbars Contextmenu |
Post Reply |
Author | |
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
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.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Jason,
Thanks for reply
There seems to be something missing... What does DismissCommandBar do ?
Maybe I didn't explain properly
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.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
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 |