protected Bitmap drawLegacyCloseButton(Int32 state)
{
Bitmap output = new Bitmap(closeButton.Width, closeButton.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
Graphics fx = Graphics.FromImage(output);
Rectangle rClose = new Rectangle(0, 0, closeButton.Width, closeButton.Height);
ButtonState bState;
if (state == CBS_PUSHED)
bState = ButtonState.Pushed;
else // the Windows 95 theme doesn't have a "hot" button
bState = ButtonState.Normal;
ControlPaint.DrawCaptionButton (fx, rClose, CaptionButton.Close, bState);
fx.DrawImage(output, rClose);
fx.Dispose();
return output;
}