protected override void OnPaintAdornments(PaintEventArgs pe) { base.OnPaintAdornments(pe); pe.Graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality; //place the text in the left bottom SizeF _s = pe.Graphics.MeasureString(compName, m_Font, this.Control.Width, m_Format); if (this.MouseOver == true) { pe.Graphics.FillRectangle(new SolidBrush(Color.White), 0, this.Control.Height - _s.Height, _s.Width, _s.Height); pe.Graphics.DrawRectangle(new Pen(Color.Black), 0, this.Control.Height - _s.Height, _s.Width, _s.Height); pe.Graphics.DrawString("The Netron Project", m_Font, new SolidBrush(Color.Black), CtrlHelper.CheckedRectangleF(0, this.Control.Height - _s.Height, _s.Width, _s.Height), m_Format); } }
protected override void OnPaintAdornments(PaintEventArgs pe) { base.OnPaintAdornments(pe); ControlPaint.DrawBorder(pe.Graphics, CtrlHelper.CheckedRectangle(0, 0, m_Control.Width, m_Control.Height), Color.FromKnownColor(KnownColor.ControlDarkDark), ButtonBorderStyle.Dotted); }