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

}
 
Top