private void button1_Click(object sender, EventArgs e) { contextMenuStrip1.Visible = true; contextMenuStrip1.Left = button1.Left; contextMenuStrip1.Top = button1.Top - contextMenuStrip1.Height; }
contextMenuStrip1.Show(MousePosition);
Point pt = PointToScreen(button1.Location); //or this one //Point pt = PointToScreen(new Point(button1.Right, button1.Top)); contextMenuStrip1.Show(pt);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)