Solved

ContextMenu Question

Posted on 2006-11-26
2
446 Views
Last Modified: 2012-08-14
Hi
   
How can i find/get the tag value from the menuitem that is clicked

  private void contextMenu_Click(object sender,ContextMenuStrip e, ContextMenu.MenuItemCollection e)
        {

            ContextMenuStrip.ItemClicked(e.tag.value);


            cmd = int.Parse(e.Tag.ToString());
            //Evaluer i switchen
            Toolbarcmd(cmd);
        }
0
Comment
Question by:vbturbo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 18

Accepted Solution

by:
Ravi Singh earned 250 total points
ID: 18015745
Hi, you need to handle the ItemClicked event not the Click event, e.g.

private void contextMenuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
            string tag = e.ClickedItem.Tag.ToString();
}
0
 
LVL 18

Author Comment

by:vbturbo
ID: 18017494
Thanks Zephyr
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

615 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