fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.Drawing.Drawing2D;
  10. using System.Drawing.Imaging;
  11.  
  12. namespace WindowsFormsApplication1
  13. {
  14. public partial class Form1 : Form
  15. {
  16. public Form1()
  17. {
  18. InitializeComponent();
  19. }
  20.  
  21. private void Form1_Load(object sender, EventArgs e)
  22. {
  23. pictureBox1.Image = bmp;
  24. timer1.Interval = 10;
  25. timer1.Enabled = true;
  26. }
  27.  
  28. private void timer1_Tick(object sender, EventArgs e)
  29. {
  30. this.hogehoge();
  31. }
  32. Bitmap bmp = new Bitmap(100, 100, PixelFormat.Format32bppArgb);
  33. private void hogehoge()
  34. {
  35. Rectangle rc = new Rectangle(Cursor.Position.X, Cursor.Position.Y, 100, 100);
  36. using (Graphics g = Graphics.FromImage(bmp))
  37. {
  38. g.CopyFromScreen(rc.X, rc.Y, 0, 0,
  39. rc.Size, CopyPixelOperation.SourceCopy);
  40. }
  41. pictureBox1.Invalidate();
  42. }
  43. }
  44. }
  45.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty