Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to capture mouse movements C# form application?

Tags:

c#

forms

How to capture mouse movements C# form application?

like image 928
Vikky Avatar asked Feb 12 '10 06:02

Vikky


1 Answers

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;
}

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

like image 79
IAbstract Avatar answered Nov 01 '22 07:11

IAbstract