Take screen-shot of current-application-window

In this post, I’ll illustrate how to take screen-shot of the current-app-window. Please go through the code to understand the snip or just grab it & paste it in your code.