Print Page | Close Window

SystemButton DblClick Solution

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=6117
Printed Date: 07 October 2024 at 12:18am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SystemButton DblClick Solution
Posted By: jpbro
Subject: SystemButton DblClick Solution
Date 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 - 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!



Replies:
Posted By: redstarsoft
Date 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


Posted By: jpbro
Date 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



Posted By: redstarsoft
Date 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


Posted By: jpbro
Date 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




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