Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - handle for the menu option?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

handle for the menu option?

 Post Reply Post Reply
Author
Message
tanyakut View Drop Down
Newbie
Newbie
Avatar

Joined: 09 March 2004
Location: United States
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote tanyakut Quote  Post ReplyReply Direct Link To This Post Topic: handle for the menu option?
    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" ?

 

 

Back to Top
robs View Drop Down
Groupie
Groupie


Joined: 09 November 2003
Status: Offline
Points: 84
Post Options Post Options   Thanks (0) Thanks(0)   Quote robs Quote  Post ReplyReply Direct Link To This Post 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])



Edited by robs
Back to Top
tanyakut View Drop Down
Newbie
Newbie
Avatar

Joined: 09 March 2004
Location: United States
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote tanyakut Quote  Post ReplyReply Direct Link To This Post Posted: 15 March 2004 at 3:42pm
Thanks a lot! You are right. I missed TRUE flag.
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.172 seconds.