private static void BeginDeferWindowPosDeferWindowPosEndDeferWindowPos(HandleRectangleWindow[] infos, IntPtr hWndInsertAfter) { IntPtr pointerToMultipleWindowPositionStructure = WinApi.BeginDeferWindowPos(infos.Length); foreach (HandleRectangleWindow info in infos) { WinApi.DeferWindowPos( pointerToMultipleWindowPositionStructure, info.Handle, hWndInsertAfter, info.RectangleWindow.X, info.RectangleWindow.Y, info.RectangleWindow.Width, info.RectangleWindow.Height, WinApi.DeferWindowPosCommands.SWP_NOACTIVATE | WinApi.DeferWindowPosCommands.SWP_NOZORDER ); } WinApi.EndDeferWindowPos(pointerToMultipleWindowPositionStructure); }