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

Customization Dialog

 Post Reply Post Reply
Author
Message
Marek View Drop Down
Groupie
Groupie


Joined: 02 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marek Quote  Post ReplyReply Direct Link To This Post Topic: Customization Dialog
    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?

 

Back to Top
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post 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!

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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.
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.