/// <summary> /// capture/store the screen shot /// </summary> /// <param name="currentScreen"> true-Active screen </param> /// <returns>image</returns> public static Image GetScreenShot(bool currentScreen) { if (currentScreen) // Simulate Alt+PrtScn keypress. SendKeys.Send("{%}({PRTSC})"); else // Simulate PrtScn keypress. SendKeys.Send("{PRTSC}"); // Get the image from the clipboard. return (Image)Clipboard.GetImage(); }