Exemple #1
0
        // Toggle border only
        private void toggleBordersOnly(bool state)
        {
            pnlTop.Height           = state ? 0 : 22;
            statusStripMain.Visible = !state;

            GlassText.MARGINS mg = new GlassText.MARGINS();
            mg.m_Buttom = 0; mg.m_Left = 0; mg.m_Right = 0; mg.m_Top = pnlTop.Height;
            GlassText.DwmExtendFrameIntoClientArea(this.Handle, ref mg);
            this.Invalidate();

            // Remove borders
            if (state)
            {
                this.noBorderFullSize = this.Size;
            }
            this.FormBorderStyle = state ? FormBorderStyle.FixedSingle : FormBorderStyle.Sizable;
            this.Size            = this.noBorderFullSize;
        }
Exemple #2
0
        public fMain()
        {
            InitializeComponent();

            // Aero trick
            if (GlassText.IsCompositionEnabled())
            {
                pnlTop.BackColor     = Color.Black;
                lblAppTitle.Location = new Point(-5, -5); lblAppTitle.Visible = false;
                GlassText.MARGINS mg = new GlassText.MARGINS();
                mg.m_Buttom = 0; mg.m_Left = 0; mg.m_Right = 0; mg.m_Top = pnlTop.Height;
                GlassText.DwmExtendFrameIntoClientArea(this.Handle, ref mg);
            }

            // MouseLeave trick
            ptOnWinTimer.Tick    += new EventHandler(ptOnWinTimer_Tick);
            ptOnWinTimer.Interval = 50;
            //ptOnWinTimer.Enabled = true;
        }