>All,
>
>We have an application(foxpro with a browse screen ui) that must create a number of different com servers (which by the way are written in vb). The servers written as activex exe's have user interfaces. However we do not want focus to go the the server interface, rather we want to reatin focus in the vfp application. However whenever we do createobject(server.name) in foxpro and the activex exe for is displayed we lose focus.
>
>How do we get it back agian immediately.
>
>We have control over both the com objects and the foxpro source but still have not found a reliable way to do it. The lack of focus is disconcerting to the user who nust click on the foxpro application screen (browse) if they notice its greyed. Otherwise it seems as if the application has hung to the user.
>
>Regards
>
>Richard Schneller
Load Foxtools in your application, and then issue the following:
DECLARE INTEGER SetForegroundWindow IN Win32API;
INTEGER hWnd
= SetForegroundWindow(MainhWnd())
George
Ubi caritas et amor, deus ibi est