ARCed.Dialogs.CaptureForm.TakeSnapShot C# (CSharp) Метод

TakeSnapShot() приватный Метод

private TakeSnapShot ( ) : void
Результат void
        internal void TakeSnapShot()
        {
            var bounds = Screen.GetBounds(Point.Empty);
            this._screenCapture = new Bitmap(bounds.Width, bounds.Height);
            using (Graphics g = Graphics.FromImage(this._screenCapture))
                g.CopyFromScreen(Point.Empty, Point.Empty, bounds.Size);
            BackgroundImage = this._screenCapture;
        }

Usage Example

Пример #1
0
 private void ButtonCaptureClick(object sender, EventArgs e)
 {
     Editor.MainInstance.Visible = false;
     Visible = false;
     Thread.Sleep(500);
     using (var captureForm = new CaptureForm())
     {
         captureForm.TakeSnapShot();
         captureForm.ShowDialog();
         this.Color = captureForm.CaptureColor;
         this.SetRGBLabels(this._argb);
         this.SetHSVLabels(this._hsv);
         this.SetRGB(this._argb);
         this.SetHSV(this._hsv);
     }
     Editor.MainInstance.Visible = true;
     Visible = true;
 }