Exemple #1
0
        private void picPaint_MouseMove(object sender, MouseEventArgs e)
        {
            toolStripStatusLabel1.Text = "Cursor: " + e.Location.X + " x " + e.Location.Y;

            if (Shape != null)
            {
                Shape.Mouse_Move(e);
                status = DRAW_STATUS.INCOMPLETE;
                if (Shape.CheckLocation(e.Location) == 0)
                {
                    Cursor = Cursors.SizeAll;
                }
                else if (Shape.CheckLocation(e.Location) > 0)
                {
                    Cursor = Cursors.Cross;
                }
                else
                {
                    Cursor = Cursors.Default;
                }
                picPaint.Refresh();
            }
        }
Exemple #2
0
        private void picPaint_MouseMove(object sender, MouseEventArgs e)
        {
            label2.Text = e.Location.X + " x " + e.Location.Y;
            if (Shape != null)
            {
                Shape.Mouse_Move(e);
                //status = DRAW_STATUS.INCOMPLETE;
                if (Shape.CheckLocation(e.Location) == 0)
                {
                    Cursor = Cursors.SizeAll;
                }
                else if (Shape.CheckLocation(e.Location) > 0)
                {
                    Cursor = Cursors.Cross;
                }

                //Thay đổi con trỏ chuột ứng với objectChoose
                if (objectChoose == "pencil")
                {
                    picPaint.Cursor = pencil;
                }
                else if (objectChoose == "eraser")
                {
                    picPaint.Cursor = eraser;
                }
                else if (objectChoose == "bucket")
                {
                    picPaint.Cursor = bucket;
                }
                else
                {
                    Cursor = Cursors.Default;
                }
                picPaint.Refresh();
            }
        }