Print Screen in C#

Print Screen in C#

 

 

            this.Hide();

            System.Threading.Thread.Sleep(2000);

            SendKeys.Send("{PRTSC}");

            this.Show();

 

            Image img = Clipboard.GetImage();

 

 

First  hide the form, so it will not come in to the picture.

For hiding a form, it will take some minor time. So we have used Thread.Sleep()

And the we send print screen command, so it will take image in clipboard.