积极答复者
用户控件的 OnPaint 事件

问题
-
//base.OnPaint(e); 写了这一句就会死机, 异常是 overflowexception ,不理解为什么会报这个异常.
if (DoubleChar)
{
using (Graphics dc = e.Graphics)
{
Font f1 = new Font("Calibri", 15, FontStyle.Bold);
Font f2 = new Font("Calibri", 16, FontStyle.Bold);dc.DrawString(LeftText, f1, new SolidBrush(PressShift ? Color.Black : Color.FromArgb(208, 208, 208)), new Point(this.Width - (int)dc.MeasureString(LeftText, f1).Width, 2));
dc.DrawString(Character ? RightText.ToLower() : RightText.ToUpper(), f2, new SolidBrush(PressShift ? Color.FromArgb(208, 208, 208) : Color.Black), new Point(0, this.Height - (int)dc.MeasureString(RightText, f2).Height - 5));
}
}
base.OnPaint(e);