//https://stackoverflow.com/q/39411950 private void btnScreenshot_Click(object sender, System.EventArgs e) { SaveFileDialog dialog = new SaveFileDialog(); dialog.DefaultExt = "jpg"; if (dialog.ShowDialog() == DialogResult.OK) { var bitmap = ControlSnapshot.Snapshot(chromeBrowser); bitmap.Save(dialog.FileName, ImageFormat.Jpeg); } }
public void ScreenshotBrowser(string filename = "BrowserScreenshot.png") { Bitmap bitmap = ControlSnapshot.Snapshot(GlobalVar.Browser); bitmap.Save(filename); }
private void btnCopyImage_Click(object sender, System.EventArgs e) { var bitmap = ControlSnapshot.Snapshot(chromeBrowser); Clipboard.SetImage(bitmap); }