Code Snippet for CaptureScreenShot

Can you please have a look at the following topic?