Click here to Skip to main content
15,920,632 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How to create and close the Context Menu in Winforms?
Posted
Updated 7-May-11 8:05am
v2
Comments
Sandeep Mewara 7-May-11 14:04pm    
Your question is for C# and you tag it ac C++, C, VB.NET!
:doh:

Tagging it properly would help you get proper audience to reply you.

 
Share this answer
 
Use Following code on Picture box to display Context menu. It will display default context menu on Right clicking the PictureBox:

private void pictureBox1_MouseClick(object sender, MouseEventArgs e)
        {
            Point p = new Point(900, 5);

            if (e.Button == MouseButtons.Right)
            {
                ContextMenuStrip cms = new ContextMenuStrip();
                pictureBox1.PointToClient(p);   
                cms.Show(comboBox1, p.X, p.Y);
            }
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900