我有一个MainPanel
包含myElement
. 当我按下面板上的鼠标按钮并myElement
在仍然按住按钮的同时将其移动过去时,myElement_MouseMove
不会被调用。
private void myElement_MouseMove(object sender, MouseEventArgs e)
{
myElementStatus_lbl.Text = "I SEE YOU";
}
当我不按住鼠标按钮时,它可以工作。
当鼠标按钮按下时如何检测鼠标移动?
this.MainPanel.Controls.Add(this.myElement);
this.MainPanel.Location = new System.Drawing.Point(182, 84);
this.MainPanel.Name = "MainPanel";
this.MainPanel.Size = new System.Drawing.Size(604, 309);
this.MainPanel.TabIndex = 0;
//
// myElement
//
this.myElement.Location = new System.Drawing.Point(220, 67);
this.myElement.Name = "myElement";
this.myElement.Size = new System.Drawing.Size(200, 100);
this.myElement.TabIndex = 0;