This article describes the method of C# to implement simple screen monitoring. Share it for your reference. The details are as follows:
This is a screen monitoring code written in C#, which can automatically take screenshots of the screen, and the software itself hides it
using System; using ; using ; using ; using ; using ; using ; using ; namespace Screen { public partial class Form1 : Form { public Form1() { //The main form desktop is not displayed. It is only displayed in the process. InitializeComponent(); = ; = false; SetVisibleCore(false); } protected override void SetVisibleCore(bool value) { (value); } private void timer1_Tick(object sender, EventArgs e) { //Get the current screen size Rectangle rect = new Rectangle(); rect = (this); Size mySize = new Size(, ); Bitmap bitmap = new Bitmap(, ); Graphics g = (bitmap); (0, 0, 0, 0, mySize); string ImageName = ("yyyyMMdd_hhmmss") + ".jpg"; ("F://screen//" + ImageName); //Release resources (); (); (); } private void Form1_Load(object sender, EventArgs e) { = true;//Activate the timer control } } }
I hope this article will be helpful to everyone's C# programming.