How to set the location of an object relative to the Form

  Kiến thức lập trình

I need that when I click on the button, the contextMenuStrip appears under it.

If you do this, the ContextMenuStrip appears outside the form, in the corner of the screen.

contextMenuStripButton1.Show(new Point(labelDataBase.Location.X, labelDataBase.Location.Y +      labelDataBase.Height));

New contributor

Елизавета Левина is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT