Solved

c# and visio

Posted on 2003-11-17
3
639 Views
Last Modified: 2012-06-27
Hi.
I'm using the visio 2003 control in c#.
When you right click on a shape the default visio context menu comes up.(Copy ,Paste and so on...).I like that,however I'd like to add another menu item to the context menu.

Does any know how I do that?Both adding the item and tracking it when I click on the item?

Thanks
0
Comment
Question by:getzel
3 Comments
 
LVL 1

Accepted Solution

by:
AJMartin earned 125 total points
ID: 9769935
Hi!
Consider getting and setting the Visio control's ContextMenu property.

Have a look at the .NET Framework SDK Documentation here:
ms-help://MS.NETFrameworkSDKv1.1/cpref/html/ frlrfSystemWindowsFormsControlClassContextMenuTopic.htm
And here:
ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfsystemwindowsformscontextmenuclasstopic.htm

quote:
--------------------------------------------------------------------------------
Note: In order to reuse MenuItem objects that are displayed in a MainMenu for use in a ContextMenu, you must create a copy of the menu using the CloneMenu method of the MenuItem class. You can also merge menu items and their submenu items into a single MenuItem object using the MergeMenu method of the MenuItem class.
--------------------------------------------------------------------------------

I hope that helps!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question