News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Help!! How to hide "Insert Page Tab"?

Started by Yangyong, June 04, 2010, 03:37:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yangyong

I have an automation project which adds pages by code. In Visio 2010, there is a "Insert Page Tab". This causes a lot of trouble for me, since I don't want users to add their own pages.
How can I hide this tab? I know I can hide all the tabs. But that's not what I want. What can I do?

-------------------------
It has been 5 days since I posted my question. No one answered me. I think I may need to say it more clearly. Here it is:

I have a C# WinForms program with an embedded Visio Drawing Control. The program generates a new page when users want to put some part of the diagram in a new page, and the program creates a link symbol in both old page and the new page. When users double-click the link symbol, the page is turned to the other page. They can also click page tabs to go to the other page.

I don't want users to add new pages themselves because in this program, there must be only one start point and one end point.
To prevent users from adding new pages, I disabled "insert pages" context menu by running the following code:

            Visio.MenuSet menuSet = visioUI.MenuSets.get_ItemAtID((int)Visio.VisUIObjSets.visUIObjSetCntx_PageTabs);
            Visio.Menu menu = menuSet.Menus[0];
            menu.Delete();

It works well in previous versions. But in Visio 2010, the smart guys in Microsoft added a new "Insert Page Tab". Till now, I cannot find a way to disable it or hide it.
Yes, I can tell my clients not to touch that tab. But that is quite ugly.
Can anyone tell me what I can do to hide it?

Thanks!!!

kedas

Hi,

This will help you
http://www.excelforum.com/excel-programming/695461-vba-to-hide-insert-worksheet-tab.html
Two possible solutions, it won't hide it but it are acceptable solutions.
I will have to do it the same way.

Removing the ribben etc. is another head age for me, I only give them a few custom buttons in 1 toolbar in visio 2003/2007 in a .net application. (no menu)
If anyone has already some code for that I would like to see that, Thanks.

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 156 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1052KB.
Tokens: post-login.
Cache hits: 13: 0.00187s for 26,750 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]