public void CaptureCurrentWindow() { using (Image img = ScreenCapture.CaptureMainWindow()) { RenderImage(img, "Window.png"); } }