Rectangle rect1 = panel1.Bounds;
rect1 = MF.mf.RectangleToScreen(rect1);
if (rect1.Contains(MousePosition))... // MousePosition是鼠标绝对位置,所有控件的边界必须用顶级父窗口来RectangleToScreen,否则定位不准}
时间: 2024-10-12 01:01:55
Rectangle rect1 = panel1.Bounds;
rect1 = MF.mf.RectangleToScreen(rect1);
if (rect1.Contains(MousePosition))... // MousePosition是鼠标绝对位置,所有控件的边界必须用顶级父窗口来RectangleToScreen,否则定位不准}