Print Page | Close Window

[SOLVED] Determine controlbutton click

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=18232
Printed Date: 23 November 2024 at 6:34am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] Determine controlbutton click
Posted By: Aaron
Subject: [SOLVED] Determine controlbutton click
Date Posted: 17 April 2011 at 10:35am
Hi,
 
I'm already using a commandbars PopupMenu in my application and it's working fine. Now I need to determine when a button is down and up. "Up" doesn't seem to be a problem because Execute event is fired when I release the button. But the difficult part (maybe piece of cake Wink) is to determine if the button is pressed (need to process something while holding button down) I really need this and prefer same look and feel as I already have (CB Popupmenu)
 
Any advice / solution will be greatly appreciated
 
Thanks a lot in advance
 
 
*edit* ExecuteOnPressInterval for PopupMenu has been added in V15.1.2 (didn't work) but fixed in V15.1.3  


-------------
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: 17 April 2011 at 12:40pm
I would have hoped that the ExecuteOnPressInterval property would have worked, but unfortunately it doesn't work for CommandBar controls in a popup menu :(

I can't think of a good reason why it shouldn't, so maybe a support ticket is appropriate here?

(Edited for wrong property name)




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

Language: Visual Basic 6.0 SP6



Posted By: jpbro
Date Posted: 17 April 2011 at 1:37pm
This seems to do the trick (not tested to heavily though, so there may be issues I didn't anticipate):

uploads/2676/PopupControlExecuteOnPress.zip - uploads/2676/PopupControlExecuteOnPress.zip


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

Language: Visual Basic 6.0 SP6



Posted By: jpbro
Date Posted: 17 April 2011 at 5:10pm
And I should say - it would be better still if ExecuteOnPressInterval worked when the controls are shown as part of a popup menu.

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

Language: Visual Basic 6.0 SP6



Posted By: Aaron
Date Posted: 18 April 2011 at 9:36am
Hi Jason,
 
Thanks a lot for looking at my problem
 
In my current implementation I already have a timer to control some processes (only for some cases I need what I previously asked, only thing I need is execute a process during mousedown) I don't see how Execute event is going to help me (if ExecuteOnPressInterval worked like should...)  to determine if user releases mouse button.
 
I will do some tests and report back inhere. Meanwhile support can also take a look at NOT working ExecuteOnPressInterval property
 
Thanks again Wink
 
 
 


-------------
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: 18 April 2011 at 9:57am
Just to be clear - my example code shows how to process repeatedly only while the mouse is down (like holding down on an updown ctrl button for example to increment/decrement a counter)

Do you just need to know when the mouse is down initially (to start some kind of processing), and when the mouse is up initially (to end that processing)? This should be doable with minor modifications (I think I can make them if this is what you need).




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

Language: Visual Basic 6.0 SP6



Posted By: Aaron
Date Posted: 18 April 2011 at 10:12am
Hi Jason,
 
Do you just need to know when the mouse is down initially (to start some kind of processing), and when the mouse is up initially (to end that processing)? This should be doable with minor modifications (I think I can make them if this is what you need).
Yes, that is what I need Wink
 
  • Right click
  • PopupMenu
  • During mousedown execute a function (over and over) until user releases mouse button
  • Mouse up should close popupmenu (if possible...)
 
Thanks


-------------
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: 18 April 2011 at 10:17am
If you remove the .CloseSubMenuOnClick property set from my demo, then start the demo:

1) Click the button (the popup appears)
2) Click and hold on the "Test" item, notice the text at the top of the window - the timer code can call your function repeatedly (you can change the timer interval for different processing speeds).
3) Release the mouse - the popup should disappear.

Is this what you need?


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

Language: Visual Basic 6.0 SP6



Posted By: Oleg
Date Posted: 20 April 2011 at 1:56am
Thanks,  ExecuteOnPressInterval  for Popup Menus implemented.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Aaron
Date Posted: 20 April 2011 at 7:48am
Hi Oleg,
 
Thanks a lot Smile
 
Question: After button is pressed (mousebutton is released), does Execute event still fire one time? If it doesn't I dont know when to stop process and this isn't solving my case. I need to know when mousebutton is released (or pressed) and have to check this in Execute event.
 
Thanks
 


-------------
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: Oleg
Date Posted: 21 April 2011 at 12:55am
If CloseSubMenuOnClick will be TRUE, Execute event will fire and will  close popup.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Aaron
Date Posted: 21 April 2011 at 1:04am

Hi Oleg,

I believe this is exactly what I need. Can you give me a date when this will be released?

 
Thanks
 


-------------
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: Aaron
Date Posted: 06 August 2011 at 6:02am
Originally posted by Oleg Oleg wrote:

If CloseSubMenuOnClick will be TRUE, Execute event will fire and will  close popup.
 
 
Hi Oleg,
 
I tried with V15.1.2
 
  • PopupMenu doesn't close when releasing mousebutton.
  • Execute event doesn't fire when releasing mousebutton.
 
http://forum.codejock.com/uploads/3701/Test_ExecuteOnPressInterval.zip - uploads/3701/Test_ExecuteOnPressInterval.zip
 
 
Thanks
 


-------------
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: Oleg
Date Posted: 08 August 2011 at 3:41am
Thanks. Updated.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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