>>Is it possible to return the handle of a form?
>>GetActiveWindow and GetForegroundWindow (in User32) only returns handle to the main FoxPro window (the same value as MainHwnd() in FoxTools).
>
>To get the window handle of a FoxPro form, you can do the following after loading the FOXTOOLS.FLL library:
>
>
>* Get the whandle from the form's caption
>lnwhandle = _WFindTitl(TheForm.Caption)
>IF lnwhandle > 0
> * Convert the whandle to hWnd
> lnhWnd = _WhTohWnd(lnwhandle)
>ENDIF
>
>
>You can find the documentation on these (as well as other) functions in the Extended Foxtools Help file, available for downloading from the Files/Coding, Syntax & Commands section.
>
>hth,
Thanks. I've tried it out and this opens a whole new world of API's.