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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
pictureBox1.Image = bmp;
timer1.Interval = 10;
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
this.hogehoge();
}
Bitmap bmp = new Bitmap(100, 100, PixelFormat.Format32bppArgb);
private void hogehoge()
{
Rectangle rc = new Rectangle(Cursor.Position.X, Cursor.Position.Y, 100, 100);
using (Graphics g = Graphics.FromImage(bmp))
{
g.CopyFromScreen(rc.X, rc.Y, 0, 0,
rc.Size, CopyPixelOperation.SourceCopy);
}
pictureBox1.Invalidate();
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYzsKdXNpbmcgU3lzdGVtLkNvbXBvbmVudE1vZGVsOwp1c2luZyBTeXN0ZW0uRGF0YTsKdXNpbmcgU3lzdGVtLkRyYXdpbmc7CnVzaW5nIFN5c3RlbS5MaW5xOwp1c2luZyBTeXN0ZW0uVGV4dDsKdXNpbmcgU3lzdGVtLldpbmRvd3MuRm9ybXM7CnVzaW5nIFN5c3RlbS5EcmF3aW5nLkRyYXdpbmcyRDsKdXNpbmcgU3lzdGVtLkRyYXdpbmcuSW1hZ2luZzsKCm5hbWVzcGFjZSBXaW5kb3dzRm9ybXNBcHBsaWNhdGlvbjEKewogICAgcHVibGljIHBhcnRpYWwgY2xhc3MgRm9ybTEgOiBGb3JtCiAgICB7CiAgICAgICAgcHVibGljIEZvcm0xKCkKICAgICAgICB7CiAgICAgICAgICAgIEluaXRpYWxpemVDb21wb25lbnQoKTsKICAgICAgICB9CgogICAgICAgIHByaXZhdGUgdm9pZCBGb3JtMV9Mb2FkKG9iamVjdCBzZW5kZXIsIEV2ZW50QXJncyBlKQogICAgICAgIHsKICAgICAgICAgICAgcGljdHVyZUJveDEuSW1hZ2UgPSBibXA7CiAgICAgICAgICAgIHRpbWVyMS5JbnRlcnZhbCA9IDEwOwogICAgICAgICAgICB0aW1lcjEuRW5hYmxlZCA9IHRydWU7CiAgICAgICAgfQoKICAgICAgICBwcml2YXRlIHZvaWQgdGltZXIxX1RpY2sob2JqZWN0IHNlbmRlciwgRXZlbnRBcmdzIGUpCiAgICAgICAgewogICAgICAgICAgICB0aGlzLmhvZ2Vob2dlKCk7CiAgICAgICAgfQogICAgICAgIEJpdG1hcCBibXAgPSBuZXcgQml0bWFwKDEwMCwgMTAwLCBQaXhlbEZvcm1hdC5Gb3JtYXQzMmJwcEFyZ2IpOwogICAgICAgIHByaXZhdGUgdm9pZCBob2dlaG9nZSgpCiAgICAgICAgewogICAgICAgICAgICBSZWN0YW5nbGUgcmMgPSBuZXcgUmVjdGFuZ2xlKEN1cnNvci5Qb3NpdGlvbi5YLCBDdXJzb3IuUG9zaXRpb24uWSwgMTAwLCAxMDApOwogICAgICAgICAgICB1c2luZyAoR3JhcGhpY3MgZyA9IEdyYXBoaWNzLkZyb21JbWFnZShibXApKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBnLkNvcHlGcm9tU2NyZWVuKHJjLlgsIHJjLlksIDAsIDAsCiAgICAgICAgICAgICAgICAgIHJjLlNpemUsIENvcHlQaXhlbE9wZXJhdGlvbi5Tb3VyY2VDb3B5KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBwaWN0dXJlQm94MS5JbnZhbGlkYXRlKCk7CiAgICAgICAgfQogICAgfQp9Cg==