Solved

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

Posted on 2006-10-30
2
273 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

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

867 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

12 Experts available now in Live!

Get 1:1 Help Now