C# getting mouse coordinates from a tab page when selected

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2010-06-08T00:06:30Z Indexed on 2010/06/08 0:12 UTC
Read the original article Hit count: 603

Filed under:
|

I wish to show the mouse coordinates only when i am viewing tabpage7.

So far i have:

this.tabPage7.MouseMove += new System.Windows.Forms.MouseEventHandler(this.OnMouseMove);

protected void OnMouseMove(object sender, MouseEventArgs mouseEv)
      {
          Console.WriteLine("happening");
          Console.WriteLine(mouseEv.X.ToString());
          Console.WriteLine(mouseEv.Y.ToString());
      }

but this doesn't appear to be doing anything, could someone help show me what im doing wrong please?

© Stack Overflow or respective owner

Related posts about c#

Related posts about mouseevent