Menu of the Stencil Window

K

Kannan.M.R

Hi,
I am using the visio activex control in the winforms. i am able to load the stencil window along with the drawing control. I have a requirement to hide or disable the paste option, when the user right clicks on the stencil pane. if somebody can help me in this it would be very much helpful.

Thanx and regards

Kannan.M.R
 
J

Jim

Try thi

//Initialize the Stencil Context Men
Visio.MenuSet menuSet = UIObj.MenuSets.get_ItemAtID((short)Visio.VisUIObjSets.visUIObjSetCntx_Master)
Visio.Menu theMenu = menuSet.Menus[0]
Visio.MenuItems theMenuItems = theMenu.MenuItems

for(int i = 0; i < theMenu.MenuItems.Count; i++

switch((short)theMenuItems.CmdNum

case (short)Visio.VisUICmds.visCmdPasteShortcut
theMenuItems.Visible = false
break
default
break

}
 

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