System.Windows.Forms.ThemeWin32Classic.CPDrawContainerGrabHandle C# (CSharp) Method

CPDrawContainerGrabHandle() public method

public CPDrawContainerGrabHandle ( Graphics graphics, Rectangle bounds ) : void
graphics System.Drawing.Graphics
bounds System.Drawing.Rectangle
return void
		public override void CPDrawContainerGrabHandle (Graphics graphics, Rectangle bounds)
		{
			Pen			pen	= Pens.Black;
			Rectangle	rect	= new Rectangle (bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1);	// Dunno why, but MS does it that way, too
			int			X;
			int			Y;
			
			graphics.FillRectangle (SystemBrushes.ControlLightLight, rect);
			graphics.DrawRectangle (pen, rect);
			
			X = rect.X + rect.Width / 2;
			Y = rect.Y + rect.Height / 2;
			
			/* Draw the cross */
			graphics.DrawLine (pen, X, rect.Y + 2, X, rect.Bottom - 2);
			graphics.DrawLine (pen, rect.X + 2, Y, rect.Right - 2, Y);
			
			/* Draw 'arrows' for vertical lines */
			graphics.DrawLine (pen, X - 1, rect.Y + 3, X + 1, rect.Y + 3);
			graphics.DrawLine (pen, X - 1, rect.Bottom - 3, X + 1, rect.Bottom - 3);
			
			/* Draw 'arrows' for horizontal lines */
			graphics.DrawLine (pen, rect.X + 3, Y - 1, rect.X + 3, Y + 1);
			graphics.DrawLine (pen, rect.Right - 3, Y - 1, rect.Right - 3, Y + 1);
		}
ThemeWin32Classic