Results 1 to 3 of 3
- 05-22-2011, 06:32 AM #1Member
- Join Date
- Nov 2010
- Rep Power
Taking screenshot using java robot class not woring when pc is locked.
I have implemented robot to take the screenshot of the desktop.
Robot objRobot = null;
objRobot = new Robot();
} catch(Exception ex)
BufferedImage objBufferedImage = objRobot.createScreenCapture(objRectArea);
The problem with robot is when my computer is locked the image comes as black.That is what is displayed in the desktop is not
captured.I need the screenshot of what is displayed in the desktop even when my computer is locked.Please suggest me any ideas.
It would be better if it is still possible to do it using robot.
- 05-22-2011, 07:04 AM #2
I'm pretty sure it's impossible. The reason I say this is because, at least for Windows, the objects are not rendered when the computer is hibernating, sleeping, logged out, or locked. Thus, when taking a screen capture, you will only ever capture black.
You will notice that, when you log into or unlock a Windows computer, the screen will show as the screen you logged out from for a single frame, then re-render as what it should be, because nothing was rendered in between.
This might be possible in C++ though a Windows API, but Java does not support such things.
- 05-22-2011, 08:56 AM #3
- By LongTTH in forum New To JavaReplies: 3Last Post: 05-03-2011, 03:24 AM
- By davetheant in forum New To JavaReplies: 2Last Post: 01-04-2011, 01:13 PM
- By coltragon in forum New To JavaReplies: 6Last Post: 07-12-2010, 05:54 PM
- By protocos in forum EclipseReplies: 11Last Post: 10-05-2009, 08:15 PM
- By Rmond1254 in forum New To JavaReplies: 1Last Post: 02-18-2009, 07:33 AM