BEHelper.TransPicBox.OnPaint C# (CSharp) Method

OnPaint() protected method

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
return void
		protected override void OnPaint(PaintEventArgs e) {
			if (this.Image != null) {
				var res = resizeImage(this.Image, this.ClientSize);
				e.Graphics.FillRectangle(SystemBrushes.Window, this.ClientRectangle);
				e.Graphics.DrawImage(res, (this.Size.Width - res.Width) / 2, (this.Size.Height - res.Height) / 2);
			}
		}