0
패널을 정렬하기 위해 사용자 지정 끌기 작업을 구현하려고합니다.끌기 또는 마우스 단추를 누른 경우 보낸 사람이 MouseMove에서 업데이트되지 않음
MouseDown 이벤트의 변수에 개체를 할당하고 마우스 커서를 위에 놓으면 이웃 패널의 MouseMove 이벤트를 검사하여 상대 위치를 추적합니다.
Private Sub ThumbnailMouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
_thumbnailMove = DirectCast(sender, Windows.Forms.Control) ‘The object to move
End Sub
문제는 MouseMove 이벤트의 Sender 매개 변수는 변하지 없다는 것입니다 - 항상 MouseDown 이벤트를받은 개체를 반환합니다.
Private Sub ThumbnailMouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
Console.WriteLine(sender.Name) 'Always returns the name of the _thumbnailToMove
End Sub
MouseMove의 Sender 인수가 마우스가 현재 가지고있는 실제 개체를 반환하지 않는 이유는 무엇입니까?