Hi Mike,
I guess the HWnd property must be in VFP7 or later as I have not encountered such form property (am using VFP6). That property definitely is very useful as you don't API calls to get its handle anymore.
Thanks
Dennis
>>
>>The last line in your code:
>>
>>
>>=SetForegroundWindow(lh_form.HWnd)
>>
>>
>>Is 'lh_form.HWnd' typed exactly as is? Since you put a dot, is HWnd a property of lh_form?
>>
>>Thanks
>>
>>My solution was to put the following before the READ EVENTS statement in my startup VFP prg:
>>
>>
>>DO FORM app_start
>>lh_form = _SCREEN.ACTIVEFORM
>>DECLARE SHORT SetForegroundWindow IN USER32.DLL INTEGER hWnd
>>=SetForegroundWindow(lh_form.HWnd)
>>