using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;

namespace Ex02_4
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {

        }

        private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
        {
            Cursor.Current = new Cursor(@"C:\WINDOWS\Cursors\cross_r.cur");  //自定义鼠标形状
            Graphics graphics = pictureBox1.CreateGraphics();
            Rectangle sourceRectangle = new Rectangle(e.X - 10, e.Y - 10, 20, 20); //要放大的区域 
            Rectangle destRectangle = new Rectangle(e.X - 20, e.Y - 20, 40, 40);
            graphics.DrawImage(pictureBox1.Image , destRectangle, sourceRectangle, GraphicsUnit.Pixel);
        }

  
        private void pictureBox1_DoubleClick(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
