System.Windows.Forms.Form.SetBoundsCore C# (CSharp) Method

SetBoundsCore() private method

private SetBoundsCore ( int x, int y, int width, int height, BoundsSpecified specified ) : void
x int
y int
width int
height int
specified BoundsSpecified
return void
		protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified) {
			Size min_size;
			
			if (WindowState == FormWindowState.Minimized)
				min_size = SystemInformation.MinimizedWindowSize;
			else
				switch (FormBorderStyle) {
					case FormBorderStyle.None:
						min_size = XplatUI.MinimumNoBorderWindowSize;
						break;
					case FormBorderStyle.FixedToolWindow:
						min_size = XplatUI.MinimumFixedToolWindowSize;
						break;
					case FormBorderStyle.SizableToolWindow:
						min_size = XplatUI.MinimumSizeableToolWindowSize;
						break;
					default:
						min_size = SystemInformation.MinimumWindowSize;
						break;
				}
			
			if ((specified & BoundsSpecified.Width) == BoundsSpecified.Width)
				width = Math.Max (width, min_size.Width);
			if ((specified & BoundsSpecified.Height) == BoundsSpecified.Height)
				height = Math.Max (height, min_size.Height);
				
			base.SetBoundsCore (x, y, width, height, specified);

			int restore_x = (specified & BoundsSpecified.X) == BoundsSpecified.X ? x : restore_bounds.X;
			int restore_y = (specified & BoundsSpecified.Y) == BoundsSpecified.Y ? y : restore_bounds.Y;
			int restore_w = (specified & BoundsSpecified.Width) == BoundsSpecified.Width ? width : restore_bounds.Width;
			int restore_h = (specified & BoundsSpecified.Height) == BoundsSpecified.Height ? height : restore_bounds.Height;
			restore_bounds = new Rectangle (restore_x, restore_y, restore_w, restore_h);
		}
Form