Mouse cursor capture

Does any body have screen canpture code in java (JNI) which captures the mouse cursor too?
i have tried Robot but that doesn't capture mouse cursor
sameerz786Asked:
Who is Participating?
 
trinitrotolueneDirector - Software EngineeringCommented:
Robot does not do screen captures which include the mouse pointer.

One possible solution could be for you to implement a native method which draws the mouse cursor on the screen capture image using the mouse coordinates.

Get the mouse coordinates through a Cursor object.
Supply these coordinates to the native method and then call this native method from your Java code.

Let me see whether there is any other way to do the same....in the meantime can you try this approach I've suggested


0
 
mbodewesCommented:
I don't have a solution, but you are better off asking the question in one of the Windows or Linux groups. You can always write Java code around any c/c++ code they can offer.

Note that the cursor is almost always hardware accelerated. It's not something that is part of the drawing of the windows or desktop at all. So the code has to be pretty explicit to include it.
0
 
trinitrotolueneDirector - Software EngineeringCommented:
just in case you need this documentation for reference:

http://java.sun.com/javase/6/docs/api/java/awt/Robot.html
0
 
trinitrotolueneDirector - Software EngineeringCommented:
have u tried this out?
0
 
sameerz786Author Commented:
Thanx i was trying to find the mouse cursor capturing method darwing it on the mouse coordinates was my last option i.e if no other way out is there, thanx for help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.