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
Follwing is the code for that.
/// capture/store the screen shot
/// true-Active screen
public static Image GetScreenShot(bool currentScreen)
// Simulate Alt+PrtScn keypress.
// Simulate PrtScn keypress.
// Get the image from the clipboard.
In the above example, GetScreenShot() function gets the screen shot and returns an Image object from the Clipboard.