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

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

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