public static Rectangle RealClientRectangle(IntPtr handle) { ip.b b = new ip.b(); ip.GetWindowRect(handle, ref b); return new Rectangle(0, 0, b.c - b.a, b.d - b.b); }
public static Padding GetWindowBorders(CreateParams cp) { ip.b b = new ip.b(); b.a = 0; b.c = 0; b.b = 0; b.d = 0; ip.AdjustWindowRectEx(ref b, cp.Style, false, cp.ExStyle); return new Padding(-b.a, -b.b, b.c, b.d); }