i want to click on a button and have it show a contextmenustrip right below the button. it keeps showing up in the left hand side of the screen when i try pointtoacreen and top and left coordinates.
any suggestions
i want to click on a button and have it show a contextmenustrip right below the button. it keeps showing up in the left hand side of the screen when i try pointtoacreen and top and left coordinates.
any suggestions
Make sure that when you're positioning the context menu that you pass it the correct screen coordinates. You'll need to use something like Control.PointToScreen, using the x, y, coordinates based on the position of the control in its parent.
I figured it out:
layoutMenus.Show(Cursor.Position.X, Cursor.Position.Y);