Пример #1
0
        private void FitGlass()
        {
            // If DWM is not enabled then get out
            if (!this.IsGlassEnabled())
            {
                return;
            }

            // Set the Margins to their default values
            marg.Top    = this.ClientSize.Height; // extend from the top
            marg.Left   = 0;                      // not used in this sample but could be
            marg.Right  = 0;                      // not used in this sample but could be
            marg.Bottom = 0;                      // not used in this sample but could be

            this.Paint += new PaintEventHandler(this.Form1_Paint);

            // call the function that gives us glass,
            // passing a reference to our inset Margins
            VistaApi.DwmExtendFrameIntoClientArea(this.Handle, ref marg);
        }