Capture screen shots of a window