To get more in depth information about the usage of WinForm or Webapplications I want to capture mouse-movement and click information. It would be perfect if this could be rendered to an image.
The result would be something like this:
The question is how does one start with creating an app like this?
(Anyone know if there is a opensource of free/cheap app which can do this)
IOGraphica is able to do this, but it is in Java and it is free, but not open source.
I would try to capture any mouse movement/click of your windows and store it in a collection. When you finished recording - try to draw your image. I would recommend looking for "c# capture mouse" or "mouse hook" in google. Some time ago I did this for getting a keyboard hook. You may have a look at Processing Global Mouse Events.
In terms of code this may help:
Dictionary<Point, MouseEventInfo> dict = new Dictionary<Point, MouseEventInfo>();
/// see given link to find the correct way to get this kind of event
public void mouse_event(....)
{
/// get mouse coordinates
/// create point struct
/// check if point exists in DICT
/// no - add new MouseEventInfo at Point
/// yes - access MouseEventInfo object and increase a value according to the event
}
public void onFinished()
{
/// create new bitmap/image - width/height according to your screen resultion
/// iterate through all MouseEventInfo objects and draw any information
}
/// stores mouse event info for a point
class MouseEventInfo
{
Point p;
int moved=0;
int clicked=0;
int doubleClicked=0;
}
I know this is just a piece of pseudoCode - anyway - I hope this may help you! Ah - keep in mind that any kind of hook (keyboard, mouse or anything else) may result in a virus alert of your antiVir.
hth
If you're looking for something which you could run externally and track mouse movement and clicks, you might find this mouse/keyboard hooking project over at codeproject.com useful:
http://www.codeproject.com/KB/system/globalmousekeyboardlib.aspx
There's a sample application and a hooking lib with full source. It'd be a starting point to use in your efforts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With