Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Mouse cursor capture

Posted on 2008-06-19
5
Medium Priority
?
1,231 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1500 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses

721 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