screenToWindow
screenToWindow(x: Real io; y: Real io);
The screenToWindow method of the Window class converts an absolute screen position into a position relative to the top and left of the window. For example, this method can be used in conjunction with the windowToScreen method to calculate a position of one window relative to another.
The method in the following example shows the use of the screenToWindow method.
vars x, y : Real; begin cntrl.windowToScreen(x, y); // Convert 0, 0 to screen coordinates. cntrl.form.screenToWindow(x, y); // x, y now positioned within the // form of the control. end;