winform 控件 point 位置计算

public Point PointToScreen(Point p)
{
    NativeMethods.POINT pt = new NativeMethods.POINT(p.X, p.Y);
    UnsafeNativeMethods.MapWindowPoints(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef, pt, 1); return new Point(pt.x, pt.y); } 

猜你喜欢

转载自www.cnblogs.com/upshania/p/12076290.html
今日推荐