Solved

Mouse cursor capture

Posted on 2008-06-19
5
1,226 Views
Last Modified: 2013-11-23
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
0
Comment
Question by:sameerz786
  • 3
5 Comments
 
LVL 9

Expert Comment

by:mbodewes
ID: 21850702
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
 
LVL 12

Accepted Solution

by:
trinitrotoluene earned 500 total points
ID: 21858428
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
 
LVL 12

Expert Comment

by:trinitrotoluene
ID: 21858483
just in case you need this documentation for reference:

http://java.sun.com/javase/6/docs/api/java/awt/Robot.html
0
 
LVL 12

Expert Comment

by:trinitrotoluene
ID: 21869258
have u tried this out?
0
 

Author Closing Comment

by:sameerz786
ID: 31468697
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now