Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - SystemButton DblClick Solution
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SystemButton DblClick Solution

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

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Topic: SystemButton DblClick Solution
    Posted: 14 January 2007 at 10:45pm
I have found a way to subclass the RibbonBar and consume the DblClick message when the mouse cursor is over the SystemButton in order to prevent an app from closing unexpectedly on the user.

You can download the DLL and Source code & Sample project, and use them/modify them any way that you wish from here:

http://www.collidingscopes.com/cmdbarbehave.zip

This DLL also has the ability to prevent the customization context menus from appearing when you right-click on a RibbonBar or SystemButton. I have added this functionality because it seems that even with all of the various customization/context properties set to FALSE, right-clicking still produces the context menu. (Maybe I am doing something wrong here though, I'm not sure).

Enjoy!
Back to Top
redstarsoft View Drop Down
Groupie
Groupie
Avatar

Joined: 23 March 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote redstarsoft Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2009 at 1:57pm
Show me error (Error in load dll)

this line

Set SystemButtonRibbonBar = objRbn ' Set to the RibbonBar that holds the SystemButton
    CloseOnSysBtnDblClick = False ' Do not unload the form if the user double-clicks the System button
    ShowContextMenus = False ' Do not show the customize context menus if the user right-clicks the ribbon bar
    StartEnforceBehaviours ' Start enforcing the above behaviours
Product: Xtreme SuitePro (ActiveX) version 13.0.0 (Trial)
Platform: Windows XP (32bit) - SP 3
Language: xHarbour

www.redstarsoft.com.br
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2009 at 2:09pm
Did you open the visual basic group file (TestProject.vbg)? Maybe try compiling the CmdBarBehaviours DLL. I've just tested it here and it is working.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
redstarsoft View Drop Down
Groupie
Groupie
Avatar

Joined: 23 March 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote redstarsoft Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2009 at 2:15pm
I see now, more think that i canīt use it in my language of programation... i use xharbour and i translate VB code to use.

thanks
Product: Xtreme SuitePro (ActiveX) version 13.0.0 (Trial)
Platform: Windows XP (32bit) - SP 3
Language: xHarbour

www.redstarsoft.com.br
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2009 at 6:51am
Are there any provisions for subclassing in XHarbour? If so, you should be able to subclass the RibbonBar and check for the WM_LBUTTONDBLCLK within the bounds of the SystemButton rectangle and consume it...
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.125 seconds.