For your first question, simply
"Log.Picture(Object)" will take such a screenshot.
As for your second question, there are two things. There's an option in your Project Properties under the Playback (Tools | Current Project Properties | Playback) for "Post image on error". Anytime an error is logged using either Log.Error or generated by some other method, a screenshot will be written to the log capturing the whole desktop. For checkpoints, you can use the
OnLogCheckpoint event handler to control what happens when you execute a checkpoint result to the log.