Results 1 to 3 of 3
- 05-22-2011, 06:32 AM #1
Member
- Join Date
- Nov 2010
- Posts
- 6
- Rep Power
- 0
Taking screenshot using java robot class not woring when pc is locked.
Hi Everyone,
I have implemented robot to take the screenshot of the desktop.
Robot objRobot = null;
try
{
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.
Thanks Regards,
Sagar.
- 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
Similar Threads
-
cant use Command Prompt to run Java App (with screenshot)
By LongTTH in forum New To JavaReplies: 3Last Post: 05-03-2011, 03:24 AM -
Help with Robot class please
By davetheant in forum New To JavaReplies: 2Last Post: 01-04-2011, 12:13 PM -
Robot class
By coltragon in forum New To JavaReplies: 6Last Post: 07-12-2010, 05:54 PM -
Help with Robot Class
By protocos in forum EclipseReplies: 11Last Post: 10-05-2009, 08:15 PM -
Help with Java Robot and Runtime Class
By Rmond1254 in forum New To JavaReplies: 1Last Post: 02-18-2009, 06:33 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks