Hi Bhavbhuti,
Each window can been ownner and parent window.
Active-X control has property hwnd - it's handle window.
You use API function GetWindow(hwnd, nFlags) or FindWindowEx(hwndParent,hwndChildAfter,lpszClass, lpszWindow) (see to MSDN) for retrieving child windows.
MartinJ
>Hi all
>
>I have an VFP app which calls an external VFP exe. This utility has instantiated an ActiveX control. This ActiveX control has in turn opened it's own 3rd party window on which there is no control from either VFP apps.
>
>Now I would like to close this window from either of the VFP apps, I would prefer to close it from the VFP exe which has instantiated the ActiveX, so that it can stay encapsulated.
>
>Hope I have been able to explain, please ask for details if required.
>
>Awaiting a solution.