private void btnLoadTest_Click(object sender, EventArgs e) { // Note: we bring the target application into the foreground because // windowed Direct3D applications have a lower framerate // if not the currently focused window _captureProcess.BringProcessWindowToFront(); start = DateTime.Now; progressBar1.Maximum = Convert.ToInt32(txtNumber.Text); progressBar1.Minimum = 0; progressBar1.Step = 1; progressBar1.Value = 0; DoRequest(); }
private void btnCapture_Click(object sender, EventArgs e) { /*start = DateTime.Now; * progressBar1.Maximum = 1; * progressBar1.Step = 1; * progressBar1.Value = 0; * * DoRequest();*/ isbench = !isbench; benchmarking.IsBenchmarking = isbench; txtDebugLog.Text = (isbench.ToString() + " <-- Current state of 'isbench' bool." + " Here is the other bool: " + benchmarking.IsBenchmarking); _captureProcess.BringProcessWindowToFront(); benchmarking.IfTrue(); }
public Bitmap getScreenshot() { _captureProcess.BringProcessWindowToFront(); return(_captureProcess.CaptureInterface.GetScreenshot(Rectangle.Empty, new TimeSpan(0, 0, 3), null, ImageFormat.Png).ToBitmap()); }
public Screenshot Capture() { CaptureProcess.BringProcessWindowToFront(); var scrn = CaptureProcess.CaptureInterface.GetScreenshot(new Rectangle(0, 0, 0, 0), new TimeSpan(0, 0, 1), null, ImageFormat.PixelData); return scrn; }
public void SetForeground() { captureProcess.BringProcessWindowToFront(); }