mouseup has to follow mousedown?

G

Guest

i have a form with a label on it

Private Sub Label1_mousedown(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown
' do stuff
End Sub


Private Sub Label1_mouseup(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles Label1.MouseUp
' do stuff
End Sub

It seems that the Mouseup event can only be triggered after the mousedown
event has happened. In other words, I can't mousedown on the form somewhere
(not on the label), then drag the mouse over my label, and mouseup, the event
doesn't fire.

Similarly, if you mousedown on the label, then drag your mouse elsewhere,
and mouseup, the event does fire. It seems that that should be a form mouseup
event rather than a label mouseup, since you're not over the label anymore.
Can anyone explain this? Is there a way to make a mouseup event fire
regardless of where you mousedowned?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top