-5

is there any event in .net forms to find the movement of the mouse? and if there isn't, please suggest me good input library. if you could help me it's going to be very nice :P

Element KZ
  • 21
  • 3
  • 1
    You could google this :( – Ali Adlavaran Aug 10 '17 at 04:28
  • I know but I can't find. that's why I'm posting here – Element KZ Aug 10 '17 at 04:39
  • 1
    see https://stackoverflow.com/questions/2063974/how-do-i-capture-the-mouse-move-event and https://msdn.microsoft.com/en-us/library/system.windows.forms.mouseeventargs.aspx and https://learn.microsoft.com/en-us/dotnet/framework/winforms/mouse-events-in-windows-forms – Ali Adlavaran Aug 10 '17 at 04:46
  • Possible duplicate of [How do I capture the mouse move event](https://stackoverflow.com/questions/2063974/how-do-i-capture-the-mouse-move-event) – MarkusEgle Aug 10 '17 at 07:36

1 Answers1

1
// The following example displays the location of the form in screen coordinates
// on the caption bar of the form.
private void Form1_Move(object sender, System.EventArgs e)
{
    this.Text = "Form screen position = " + this.Location.ToString();
}

For that please read Control.Move Event on msdn or stackoverflow.

MouseMove Event in Form on stackoverflow

MarkusEgle
  • 2,795
  • 4
  • 41
  • 61