Monday, December 10, 2007

Windows From Mouse Right Click pop up menu in c#

Muse right click menu

1.Create Menu in design view (by adding "ContextMenu" control onto the form in the design view )
2.add following code( MouseUp event of the form)

private void Form1_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
contextMenuStrip1.Show(this,e.X, e.Y);
}
}

No comments:

Post a Comment