public void PrintScreenSelected() { formScreenShort frm = new formScreenShort(); // frm.Size = Screen.PrimaryScreen.Bounds.Size; frm.Size = Screenshot.GetSizeAllScreens(); frm.ShowDialog(); if (frm.Result != -1) { Bitmap img; string filename; img = Screenshot.ImageFromScreenXY(Screenshot.Rect.Left, Screenshot.Rect.Top, Screenshot.Rect.Right, Screenshot.Rect.Bottom); if (Properties.Settings.Default.GraphEditor) { if (CallGraphEditor(img) == DialogResult.Cancel) { return; } } Clipboard.SetImage(img); Screenshot.Notify(notifyIcon1, "", 1); filename = Screenshot.SaveImage(pictureBox1, img); Screenshot.Notify(notifyIcon1, filename, 2); } }
public void PrintScreenSelectedActiveWindow() { // Screenshot.RECT rect; Bitmap img; string filename; Screenshot.Rect = Screenshot.GetActiveWindowRect(); formScreenShort frm = new formScreenShort(); frm.Size = Screen.PrimaryScreen.Bounds.Size; frm.ShowDialog(); img = Screenshot.ImageFromScreenXY(Screenshot.Rect.Left, Screenshot.Rect.Top, Screenshot.Rect.Right, Screenshot.Rect.Bottom); Clipboard.SetImage(img); Screenshot.Notify(notifyIcon1, "", 1); filename = Screenshot.SaveImage(pictureBox1, img); Screenshot.Notify(notifyIcon1, filename, 2); }