WindowFromPoint
Return the Control at the current cursor position or at the given point:
Control WindowFromPoint();
Control WindowFromPoint(Point p);
Parameters
Point:
A position on the screen
Return Value
A control object.
Example
Control C = WindowFromPoint(); // the window control under the current mouse cursor position
Control newWind = WindowFromPoint(oldWindow.Centre); // get window at location of oldWindow
Related: