更新时间:2023-12-06 13:16:52
The Control class has a static readonly MousePosition property, this gives the mouse coordinates on the screen. You could use this to know where to position the ContextMenu.
从MSDN:
Control.MousePosition属性
Control.MousePosition Property
类型:System.Drawing.Point
Type: System.Drawing.Point
包含坐标的点 鼠标光标相对于 屏幕的左上角.
A Point that contains the coordinates of the mouse cursor relative to the upper-left corner of the screen.