Brh.Forms.PopupNotify.DrawLegacyCloseButton C# (CSharp) Метод

DrawLegacyCloseButton() защищенный Метод

Draw a Windows 95 style close button.
protected DrawLegacyCloseButton ( CloseButtonState state ) : Bitmap
state CloseButtonState
Результат System.Drawing.Bitmap
        protected Bitmap DrawLegacyCloseButton(CloseButtonState 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 == CloseButtonState.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;
        }