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.Imaging; using System.Threading; using System.Security.Principal; namespace SystemMonitoring { public partial class Form1 : Form { int pictureCount = 0; private static Bitmap bmpScreenShot; private static Graphics gfxScreenShot; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { this.Hide(); for (pictureCount = 0; pictureCount - 1 < pictureCount; ) { bmpScreenShot = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb); gfxScreenShot = Graphics.FromImage(bmpScreenShot); gfxScreenShot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy); bmpScreenShot.Save(@"D:\brinda\" + System.Environment.GetEnvironmentVariable("COMPUTERNAME") + DateTime.Now.ToString("_dd-MM-yyyy_HH_mm_ss") + ".jpeg", ImageFormat.Jpeg); Thread.Sleep(10000); pictureCount++; } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)