Custom Menu Help

G

GAR8

Hello fellow Visio developers,

I'm a newb and looking for help on custom menu's. I have the Visio ocx
on a form in VB6. This form is then placed on "tab" using third party
software, dockstudioxp. When I put the form on this tab it strips off
any and all visio menu's. So, I am have created some of the Visio
menus using the dockstudioxp software and I want to know if I can call
a Visio menu command from within VB6? For example I have the View menu
re-created, is it possible to call the "Shapes Window" or "Pan and Zoom
Window" menu commands using the Visio ocx connection or a reference to
Visio itself? Any sample code or help would be greatly appreciated.
All I have seen is documentation for creating a custom menu on the VDC,
which won't work.

Thank You G
 
C

Chris Roth [MVP]

Hey Greg,

Here's a couple of hints:

You can toggle the window using DoCmd, but you don't know if it's visible or
invisible:

Visio.Application.DoCmd(visCmdPanZoom) '1653

Or explicitily turn them on or off. The Anchor windows are child windows of
the drawing window. This will show the Pan & Zoom:

Visio.ActiveWindow.Windows(2).Visible = True

You can write a loop to see which child windows are which. Look for the
subWin.Caption property to see which window is which.

--
Hope this helps,

Chris Roth
Visio MVP

Free Visio shapes:
http://www.visguy.com/category/shapes
Visio programming info:
http://www.visguy.com/category/programming/
Other Visio resources:
http://www.visguy.com/visio-links/
 
G

GAR8

Chris,
Thank You for the response.

Yeah, duh, I found the DoCmd shortly after posting this, boy do I feel
stupid. Thanks for the response and code though.

Is there any where I can get the menu images that Visio uses so I can
display those on my own menu control?

Greg
 
G

GAR8

Chris,
Thank You for the response.

Yeah, duh, I found the DoCmd shortly after posting this, boy do I feel
stupid. Thanks for the response and code though.

Is there any where I can get the menu images that Visio uses so I can
display those on my own menu control?

Greg
 
G

GAR8

Chris,
Thank You for the response.

Yeah, duh, I found the DoCmd shortly after posting this, boy do I feel
stupid. Thanks for the response and code though.

Is there any where I can get the menu images that Visio uses so I can
display those on my own menu control?

Greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top