private void optionsWindow_Load(object sender, EventArgs e) { Bitmap image = null; while (image == null) { image = ScreenCapturer.CaptureScreen(true, true); } spinnerWidth.Maximum = image.Width / 2; spinnerHeight.Maximum = image.Height / 2; this.pictureBox.Image = image; }
private void captureLoop() { while (true) { if (Environment.TickCount - last > 35) { Bitmap bitmap = ScreenCapturer.CaptureScreen(false, false); last = Environment.TickCount; if (bitmap != null) { pictureBox.Image = bitmap; } } } }