How to capture/store screen shot
We all are familiar with taking screen shot manully by pressing “Print Screen" key. There are two alternative for using “Print Screen" key
1) Alt+PrtScn -Image of active screen
2) PrtScn - Image of Desktop
Here I am trying to simulating above two method using C#.
/// <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();
}
In the above example, GetScreenShot() function gets the screen shot and returns an Image object from the Clipboard.

pl tell me wat are the namespaces required