Example #1
0
        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;
        }
Example #2
0
 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;
             }
         }
     }
 }