Print Page | Close Window

handle for the menu option?

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=530
Printed Date: 31 January 2025 at 7:06am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: handle for the menu option?
Posted By: tanyakut
Subject: handle for the menu option?
Date Posted: 15 March 2004 at 1:09pm

How  can I get a handle for one of the menus?

I dont' have any problem with toolbar (I used "findControl" method):
    Set Control = frmMain.CommandBars.FindControl(, <ID goes here>)
             Control.Visible = False

But menus don't work the same way... I was able to get a handle only for the main menus  like  "File", "View", "Tools" ..
 set control =  frmMain.CommandBars.ActiveMenuBar.FindControl(,ID_MY_V IEW)
But what about other menu options which you can see when you click on "View" or "Tools" ?

 

 




Replies:
Posted By: robs
Date Posted: 15 March 2004 at 1:30pm

Try this:

 set control =  frmMain.CommandBars.ActiveMenuBar.FindControl(,ID_MY_V IEW, ,True)

I think you're just missing the 'true' recursive property:

Function FindControl([Type], Id As Long, [Visible], [Recursive])



Posted By: tanyakut
Date Posted: 15 March 2004 at 3:42pm
Thanks a lot! You are right. I missed TRUE flag.



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