My form hierarchy is something like this:
Form -> TableLayoutOne -> TableLayoutTwo -> Panel -> ListBox
In the MouseMove event of the ListBox, I have code like this:
Point cursosPosition2 = PointToClient(new Point(Cursor.Position.X, Cursor.Position.Y));
Control crp = this.GetChildAtPoint(cursosPosition2);
if (crp != null)
MessageBox.Show(crp.Name);
The MessageBox is showing me "TableLayoutOne", but I expect it to show me "ListBox". Where in my code am I going wrong? Thanks.