private void TopPanel_MouseMove(object sender, MouseEventArgs e)
 {
     if (isTopPanelDragged)
     {
         Point newPoint = TopPanel.PointToScreen(new Point(e.X, e.Y));
         newPoint.Offset(offset);
         this.Location = newPoint;
     }
 }
Ejemplo n.º 2
0
        private void TopPanel_MouseMove(object sender, MouseEventArgs e)
        {
            if (isTopPanelDragged)
            {
                Point newPoint = TopPanel.PointToScreen(new Point(e.X, e.Y));
                newPoint.Offset(offset);
                this.Location = newPoint;

                if (this.Location.X > 2 || this.Location.Y > 2)
                {
                    if (this.WindowState == FormWindowState.Maximized)
                    {
                        this.Location = _normalWindowLocation;
                    }
                }
            }
        }
Ejemplo n.º 3
0
        private void TopPanel_MouseMove(object sender, MouseEventArgs e)
        {
            if (isTopPanelDragged)
            {
                Point newPoint = TopPanel.PointToScreen(new Point(e.X, e.Y));
                newPoint.Offset(offset);
                this.Location = newPoint;

                if (this.Location.X > 2 || this.Location.Y > 2)
                {
                    if (this.WindowState == FormWindowState.Maximized)
                    {
                        this.Location         = _normalWindowLocation;
                        this.Size             = _normalWindowSize;
                        _MaxButton.CFormState = MinMaxButton.CustomFormState.Normal;
                        isWindowMaximized     = false;
                    }
                }
            }
        }