I need to write a .NET application that captures screenshots of various web pages periodically. The application needs to run as a windows service in unattended mode - when there is no user session or when the workstation is locked. A situation similar to: (http://stackoverflow.com/questions/1445788/c-screenshot-of-process-under-windows-service), only, I need to do this on web pages rather than processes.
When I try to use PrintWindow API, I am able to capture inactive or hidden windows, but get a black image when the workstation is locked. Tried this approach (www.devnewsgroups.net/group/microsoft.public.dotnet.framework.windowsforms/topic34231.aspx) but doesn't work.
I know this is possible since there are apps like WebShot (www.websitescreenshots.com) that are able to do it - capture screenshots of web pages even when the workstation is locked or when it runs as a service.
What am I missing? How do I get this to work?
Thanks much for your time.
Edit: More on my approach - I'm using the .NET WebBrowser control created programmatically. I load the webpage in the browser control and capture the image from it using the PrintWindow API. This I'm able to do whether the control is visible or not, but it trips me up when the workstation is locked.