Exemplo n.º 1
0
        private void GetWindowRect()
        {
            sw2 = new Stopwatch();
            sw2.Start();

            var bitmap = CaptureScreen.SnapShot(3, 34, new Size(500, 750), process);

            sw2.Stop();
            if (bitmap != null)
            {
                var memoryStream = new MemoryStream();
                bitmap.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Png);
                var image = Image.FromStream(memoryStream);
                pictureBox1.BackgroundImage = image;
            }
        }