Exemplo n.º 1
0
        public Form1()
        {
            StartPosition = FormStartPosition.CenterScreen;
            Width         = screenCaptureArea.Width;
            Height        = screenCaptureArea.Height;

            pictureBox = new PictureBox
            {
                Image  = ScreenCaptureHelper.CaptureScreenArea(screenCaptureArea),
                Width  = screenCaptureArea.Width,
                Height = screenCaptureArea.Height
            };

            this.Controls.Add(pictureBox);

            var timer = new Timer {
                Interval = 30
            };

            timer.Tick += TimerOnTick;

            timer.Start();
        }
Exemplo n.º 2
0
        private void TimerOnTick(object sender, EventArgs eventArgs)
        {
            pictureBox.Image = ScreenCaptureHelper.CaptureScreenArea(screenCaptureArea);

            GC.Collect();
        }