我希望僅在查看tabpage7時才顯示鼠標座標。C#從選項卡頁面中選擇鼠標座標
到目前爲止,我有:
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());
}
但這並不似乎做任何事情,可能有人幫告訴我,我做錯了什麼嗎?