Print Page | Close Window

Customization Dialog

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=1987
Printed Date: 02 July 2024 at 6:27pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Customization Dialog
Posted By: Marek
Subject: Customization Dialog
Date Posted: 18 March 2005 at 3:59pm

Is there any way to bring up the Customization Dialog other than right click on toolbar area or from the drop down at the end of the toolbar? ie can I bring it up from a control, or is there no call on the control to activate it?

 




Replies:
Posted By: Boyd
Date Posted: 18 March 2005 at 8:40pm

The following routine can be used to simulate the execution of any control based on the ID of that control:

Public Sub ExecuteCommandBarControl(ByRef CommandBars As CommandBars, ByVal ID As Long)
  Dim TempBar As CommandBar, Control As CommandBarControl
  If CommandBars Is Nothing Then Exit Sub
  Set TempBar = CommandBars.Add("Temp", xtpBarPopup)
  Set Control = TempBar.Controls.Add(xtpControlButton, ID, "Temporary")
  Control.Execute
End Sub

Just pass a reference to your CommandBars object and the ID to execute.  The trick here is that you need the ID of the 'Customize' menu option.  I don't know this off the top of my head, but it's easy enough to find out.  Just place a debug message in the 'Update' event of CommandBars to output the Caption and ID of the control being updated.  When you drop down the menu that has the 'Customize' option, it'll trigger the 'Update' event and you'll see the proper ID value in the debug message.

Hope this helps lead you in the right direction.  This was the best hack I could come up with since they didn't provide a basic method for this.  Enjoy!



Posted By: SuperMario
Date Posted: 21 March 2005 at 10:54am
The ID is 35001.  All you need to do is add a control with ID 35001 as you would any other control.



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