how can take screen prints of mouse clicks and only of active window

Nirvana
Nirvana used Ask the Experts™
on
How can i take screen prints of mouse clicks and only of active window.. something like psr, the problem i am having is psr takes screenprint of entire screen. is there a code that i can use to get this done
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Please take a look at this:

http://www.hongkiat.com/blog/win-screen-recording-softwares/

In Ezvid, for example, you can cut the video on the area you want.

Hope it helps. Regards.

Commented:
The mouse is not included with a printscreen. A window alone can be captured using ALT+PRTSCN.
But if you want some kind of instructional video, try Jing (free!) to record a video (either full screen, just a window, or even a block you select yourself, includes mouse pointer, optionally records your voice during the recording)

https://www.techsmith.com/jing.html
Nirvanalearner

Author

Commented:
I am looking for auto screen print with the above mentioned features. just like what psr does but only for  active window
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

Commented:
As I said,  ALT+PRTSCN
Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009
Commented:
That'll be some complex code!

You'd first need a low level mouse hook via WH_MOUSE_LL to capture when the user clicks outside of your application.  Then you'd grab the current mouse location with Cursor.Position and pass that to WindowFromPoint() to get a window handle.  From there, you'd use SendMessage() with WM_GETTEXT, and GetClassName() to determine what the user actually clicked on.  Next you could determine the main window with GetAncestor() and GA_ROOT.  Armed with the handle of the main app, you could determine its bounds with GetWindowRect().  Now you've got the cords to pass to Graphics.CopyFromScreen().  There are other ways to do it, and you might need some other helper APIs along the way, but that should give you a good start...
Nirvanalearner

Author

Commented:
I am in a training team and when i explain the processes to the employees i need to take screen print of each of the activity to create SOP (standard operating procedure).
I am looking at a solution where it automatically takes the screen print of the window where i click the mouse.. for example if i am using notepad it have to take screenprint of it.
PSR is a inbuilt app in windows.. however there are few limitations like it take screen print of entire scree and limits to only 99 screen prints
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009
Commented:
I don't know if there is an off the shelf application that fits your requirements, there could be; others here might be able to point you in the right direction.

From a programming standpoint, however, if written from scratch, I can say that this would be an advanced, complex project.  This isn't something you could just throw together from bits and pieces found on the internet.  If you're serious about coding this yourself, start with implementing the low level mouse hook and trapping mouse clicks in your app.  Google (and EE) has tons of examples...
Nirvanalearner

Author

Commented:
Hi Mike. thank you Yeah i understand it might be a complex project. initially i though this should be easy..however as i was going through seems like its not going to be easy.. will check if i can do something with autohotkey

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial