protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
Rectangle vRectangle = new Rectangle((Width - 75) / 2, 3, 75, 25);
switch (m.Msg)
{
case WM_NCPAINT:
case WM_NCACTIVATE:
IntPtr vHandle = GetWindowDC(m.HWnd);
Graphics vGraphics = Graphics.FromHdc(vHandle);
vGraphics.FillRectangle(new LinearGradientBrush(vRectangle,
Color.Pink, Color.Purple, LinearGradientMode.BackwardDiagonal),
vRectangle);
StringFormat vStringFormat = new StringFormat();
vStringFormat.Alignment = StringAlignment.Center;
vStringFormat.LineAlignment = StringAlignment.Center;
vGraphics.DrawString("About", Font, Brushes.BlanchedAlmond,
vRectangle, vStringFormat);
vGraphics.Dispose();
ReleaseDC(m.HWnd, vHandle);
break;
case WM_NCLBUTTONDOWN:
Point vPoint = new Point((int)m.LParam);
vPoint.Offset(-Left, -Top);
if (vRectangle.Contains(vPoint))
MessageBox.Show(vPoint.T oString());
break;
}
}