using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form2 : WeifenLuo.WinFormsUI.DockContent
{
int _RectangleX; //矩形框的左上顶点的X坐标
int _RectangleY; //矩形框的左上顶点的Y坐标
int _OldMouseX; //鼠标左键按下时的X点坐标
int _OldMouseY; //鼠标左键按下时的Y点坐标
int _NewMouseX; //鼠标移动时的X点坐标
int _NewMouseY; //鼠标移动时的Y点坐标
int _RectangleWidth; //选择区域的宽度
int _RectangleHeight; //选择区域的高度
Pen _Pen = new Pen(Color.LightBlue, 2);
[System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")]
private static extern bool BitBlt(
IntPtr hdcDest, // handle to destination DC
int nXDest, // x-coord of destination upper-left corner
int nYDest, // y-coord of destination upper-left corner
int nWidth, // width of destination rectangle
int nHeight, // height of destination rectangle
IntPtr hdcSrc, // handle to source DC
int nXSrc, // x-coordinate of source upper-left corner
int nYSrc, // y-coordinate of source upper-left corner
System.Int32 dwRop // raster operation code
);