I have a MainPanel that contains myElement . When I click the mouse button on the panel and move it over myElement while still holding the button, myElement_MouseMove not called.
private void myElement_MouseMove(object sender, MouseEventArgs e) { myElementStatus_lbl.Text = "I SEE YOU"; }
This works when I do not hold the mouse button.
How to detect mouse movement at the click of a mouse button?
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;
source share