How to Capture Mouse Movement in C#.NET

1 reply [Last post]
rocker
rocker's picture
User offline. Last seen 6 years 23 weeks ago. Offline
Joined: 11/19/2009

How to Capture / Handle Mouse Movement in c#.NET form.

Vaibhav
Vaibhav's picture
User offline. Last seen 1 week 2 days ago. Offline
Joined: 08/19/2009
Here is the code. public

Here is the code.

public Form1( ) 
{ 
    InitializeComponent(); 
 
    this.MouseMove += new MouseEventHandler(Form1_MouseMove); 
} 
 
void Form1_MouseMove(object sender , MouseEventArgs e) 
{ 
    label1.Text= e.Location; 
} 

 

Also take a look at following links.

  1. Mouse and Keyboard library

  2. Handling Mouse Events in C#

Who's online

There are currently 0 users and 5 guests online.

Recent Answers

Anonymous added a answer to 301 Redirect in asp.net (29 weeks 2 days ago)
 
Anonymous added a answer to 301 Redirect in asp.net (29 weeks 2 days ago)
 
Anonymous added a answer to 301 Redirect in asp.net (29 weeks 4 days ago)
 
Anonymous added a answer to 301 Redirect in asp.net (29 weeks 4 days ago)
 
Anonymous added a answer to 301 Redirect in asp.net (29 weeks 5 days ago)
 
Anonymous added a answer to 301 Redirect in asp.net (29 weeks 5 days ago)