private void button4_Click(object sender, EventArgs e) { Rect rect = new Rect { left = 50, top = 50, right = 110, bottom = 110 }; bool result = Win32API.AdjustWindowRect(ref rect, WndStyle.WS_CAPTION | WndStyle.WS_BORDER | WndStyle.WS_SYSMENU, false); }