public partial class Form1 : Form { public Form1() { InitializeComponent(); } Bitmap bmp; Graphics gr; private void btn_start_Click(object sender, EventArgs e) { timer1.Start(); } private void btn_stop_Click(object sender, EventArgs e) { timer1.Stop(); } private void timer1_Tick(object sender, EventArgs e) { bmp = new Bitmap(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); gr = Graphics.FromImage(bmp); gr.CopyFromScreen(0, 0, 0, 0, new Size(bmp.Width, bmp.Height)); pictureBox1.Image = bmp; pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)