private void CaptureArea() { var screenshot = ScreenshotProvider.TakeScreenshot(SystemInformation.VirtualScreen); var dialog = new SelectAreaDialog(screenshot); if (dialog.ShowDialog() == DialogResult.OK) { Bitmap croppedScreenshot = screenshot.Clone( dialog.SelectedArea, screenshot.PixelFormat); ProcessScreenshot(croppedScreenshot); } dialog.Dispose(); }