private Image GetNativeMenuItemImage()
        {
            if ((this.nativeMenuCommandID == -1) || (this.nativeMenuHandle == IntPtr.Zero))
            {
                return(null);
            }
            System.Windows.Forms.NativeMethods.MENUITEMINFO_T_RW lpmii = new System.Windows.Forms.NativeMethods.MENUITEMINFO_T_RW {
                fMask = 0x80,
                fType = 0x80,
                wID   = this.nativeMenuCommandID
            };
            System.Windows.Forms.UnsafeNativeMethods.GetMenuItemInfo(new HandleRef(this, this.nativeMenuHandle), this.nativeMenuCommandID, false, lpmii);
            if ((lpmii.hbmpItem != IntPtr.Zero) && (lpmii.hbmpItem.ToInt32() > 11))
            {
                return(Image.FromHbitmap(lpmii.hbmpItem));
            }
            int num = -1;

            switch (lpmii.hbmpItem.ToInt32())
            {
            case 2:
            case 9:
                num = 3;
                break;

            case 3:
            case 7:
            case 11:
                num = 1;
                break;

            case 5:
            case 6:
            case 8:
                num = 0;
                break;

            case 10:
                num = 2;
                break;
            }
            if (num <= -1)
            {
                return(null);
            }
            Bitmap image = new Bitmap(0x10, 0x10);

            using (Graphics graphics = Graphics.FromImage(image))
            {
                ControlPaint.DrawCaptionButton(graphics, new Rectangle(Point.Empty, image.Size), (CaptionButton)num, ButtonState.Flat);
                graphics.DrawRectangle(SystemPens.Control, 0, 0, image.Width - 1, image.Height - 1);
            }
            image.MakeTransparent(SystemColors.Control);
            return(image);
        }