>I have a Form. In this Form I instantiate a COM component. This component has a Create_Object method to create business and return objects within this component.
>
>
>loCOM = CreateObject("Server.Class")
>loCOM.Create_Object("BusinessAsUsual")
>
>
>As soon as I use this method my form loses its focus and it doesn't return. If I press Alt-TAB I can see a Windows logo with the name of the Component. If I select that nothing happens but pressing Alt-TAB again doesn't show this component again. Using Alt-Tab I can get focus back on my application (and the form). How can I prevent this form losing its focus or how do I reset it after it is lost?
If this is VFP 7.0 or later, you could use the API command SetActiveWindow() in the API in the Show event.
George
Ubi caritas et amor, deus ibi est