Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - [SOLVED] Determine controlbutton click
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] Determine controlbutton click

 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: [SOLVED] Determine controlbutton click
    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....
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: 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

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: 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
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

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: 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

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: 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....
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: 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

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: 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....
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: 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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 April 2011 at 1:56am
Thanks,  ExecuteOnPressInterval  for Popup Menus implemented.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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: 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....
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
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: 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....
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: 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.
 
 
 
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....
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2011 at 3:41am
Thanks. Updated.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.141 seconds.