Beispiel #1
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;
        }
Beispiel #2
0
        // Toggle border only
        private void toggleBordersOnly(bool state)
        {
            Debug.WriteLine("toggleBordersOnly");

            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();
        }