![]() |
SystemButton DblClick Solution |
Post Reply ![]() |
Author | |
jpbro ![]() Senior Member ![]() ![]() Joined: 12 January 2007 Status: Offline Points: 1355 |
![]() ![]() ![]() ![]() ![]() 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! |
|
![]() |
|
redstarsoft ![]() Groupie ![]() ![]() Joined: 23 March 2009 Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
jpbro ![]() Senior Member ![]() ![]() Joined: 12 January 2007 Status: Offline Points: 1355 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
redstarsoft ![]() Groupie ![]() ![]() Joined: 23 March 2009 Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
jpbro ![]() Senior Member ![]() ![]() Joined: 12 January 2007 Status: Offline Points: 1355 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
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 |