[VS Community 2017]
On a Form I have a user control. The user control has 1 Label control (and 4 PictureBox controls, which are not involved in this question).
The Label control sits at position 0,0 of the user control, and the user control at position 0,0 of the Form.
In the user control code, I want to locate the mouse pointer on the Label control.
Private Sub cLblTitle_MouseMove(sender As Object, e As MouseEventArgs) _
Handles Me.MouseMove
Debug.Print(e.X.ToString & ", " & e.Y.ToString)
End Sub
The Label control may contain left-aligned text. If it does, only the blank area to the right of the displayed text does give feedback via Debug.Print. If I shorten text (in the running app), more area is responding, if I make it longer, less area is responding, if I remove all text, the whole area up to X=0 is responding.
What does cause this behaviour, and how do I get the mouse position also on the label area containing text?
(I added the VS version in case it might be a bug. I gladly provide more details about the UC/Form if needed.)