728x90

    Rectangle backup;

        private void checkBox_mouse_tracking_CheckedChanged(object sender, EventArgs e)

        {

            if (checkBox_mouse_tracking.Checked)

            {

                backup = Cursor.Clip;

                this.Cursor = new Cursor(Cursor.Current.Handle);

                Cursor.Position = new Point(this.Location.X+ label_mouse_tracking.Location.X , this.Location.Y + label_mouse_tracking.Location.Y);

                Point p = new Point(this.Location.X + label_mouse_tracking.Location.X+7, this.Location.Y + label_mouse_tracking.Location.Y+30);

                

                Cursor.Clip = new Rectangle(p, label_mouse_tracking.Size);

            }

            else

            {

                Cursor.Clip = backup;

            }

            

        }



    }

728x90

+ Recent posts