Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form losing focus
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00962204
Message ID:
00962449
Views:
8
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform