Пример #1
0
        public static void EnableAero(IntPtr hwnd)
        {
            MARGINS mg = new MARGINS();

            mg.m_Buttom = -1;
            mg.m_Left   = -1;
            mg.m_Right  = -1;
            mg.m_Top    = -1;
            WinAPI.DwmExtendFrameIntoClientArea(hwnd, ref mg);

            Control.FromHandle(hwnd).BackColor = GetAeroBackgroundColor();
            ((Form)Control.FromHandle(hwnd)).TransparencyKey = GetAeroBackgroundColor();
        }