>Ed,
>
>But mainhwnd() is just as easy and doesn't require VFP being the active window at the time.
>
No question that mainhwnd() is useful, but it does require FOXTOOLS.FLL; GetActiveWindow is always there as a part of the Win32 environment.
>>In addition, you can use the extrememly simple GetActiveWindow API call as long as VFP has focus:
>>
>>DECLARE INTEGER GetActiveWindow IN WIN32API
>>nhWnd = GetActiveWindow()