tags:

views:

106

answers:

3

How to capture mouse movements C# form application?

+4  A: 

Here's a snippet:

Point mouseLocation;

public Form1( )
{
    InitializeComponent();

    this.MouseMove += new MouseEventHandler(Form1_MouseMove);
}

void Form1_MouseMove(object sender , MouseEventArgs e)
{
    mouseLocation = e.Location;
}

astander gives 3 excellent links for research -- I simply like writing code snippets ;)

dboarman
A: 

Have a look at this nifty little library (CodeProject.com):

Mouse and Keyboard library

Chris Dunaway