views:

344

answers:

2

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

+1  A: 

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.

Michael Todd
+1  A: 

I figured it out:

layoutMenus.Show(Cursor.Position.X, Cursor.Position.Y);
ooo