Ejemplo n.º 1
0
        // 최소화 버튼
        private void minimizeButton_Click_1(object sender, EventArgs e)
        {
            MinimizeButton minimizeButton = (MinimizeButton)sender;
            TopBarPanel    topBarPanel    = (TopBarPanel)minimizeButton.Parent;
            Form           form           = (Form)topBarPanel.Parent;

            form.WindowState = FormWindowState.Minimized;
        }
Ejemplo n.º 2
0
        private void mouseMove_1(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            TopBarPanel topBarPanel = (TopBarPanel)sender;
            Form        form        = (Form)topBarPanel.Parent;

            if (isMouseDown)
            {
                form.Location = new Point(form.Location.X + (e.X - Pos.X), form.Location.Y + (e.Y - Pos.Y));
            }
        }
Ejemplo n.º 3
0
        private void mouseDown_1(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            TopBarPanel topBarPanel = (TopBarPanel)sender;
            Form        form        = (Form)topBarPanel.Parent;

            if (e.Button == MouseButtons.Left)
            {
                isMouseDown = true;
                Pos         = e.Location;
            }
        }