Solved

a 'recorder' type program detecting and replaying mouse events and keyboard events while program is minimized

Posted on 2006-10-30
2
276 Views
Last Modified: 2010-04-16
Hello,

Remember that really old program that came with windows 3.1 called 'recorder'?  Well I'm trying to recreate it in C# for help with software testing.  My goal is (preferably without help of the windows api) to have a program minimize itself, then record everything that I do (with regard to keyboard presses and mouse clicks and moves) until I click on the minimized taskbar button of my recorder application.  Then write all that stuff to a script so I can replay it later.  I don't really know where to get started, but it would be helpful first of all to know how to detect keyboard presses, and mouse moves and clicks while my application is minimized.  Can anyone help?

Thanks
0
Comment
Question by:prosh0t
2 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 17836043
(preferably without help of the windows api)

You won't be able to accomplish this without the use of APIs...not unless you find a DLL/Control that someone else has already written that can do all this for you!

What you need is a low level keyboard/mouse hook to detect keypresses/mouse movements while your app is minimized.

See TheLearnedOne's example here:
http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21475143.html

Then to later "replay" those events (after storing them somehow...that's a whole different ball of wax) you would need some more APIs.  SendInput() is one way:
http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_20641926.html
0
 
LVL 7

Author Comment

by:prosh0t
ID: 17836130
Thanks!



0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

679 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