Zlatin,
Since the ActiveX is hosted by it's own window I think that's why you are seeing the effect you are seeing.
There's nothing you can do about that behavior.
You can instead put more intelligence in your code that's using ActiveForm and test to see if you really have a VFP form or not.
>We have developed (derived from VB native image control) own ActiveX control to handle images in VFP (not-isometric streching, cut/copy/paste and other functions not available in standard ActiveX controls.)
>
>My question is related to the way FoxPro determines which form is the active one (the value of property ActiveForm).
>
>Each time we refer to this property from the Activate event of the form with this ActiveX on it, its value is correct - ActiveForm returns refference to thisform (which is Activated).
>
>However as soon as the ActiveX control gets the focus the property ActiveForm is no longer valid - it contains reference to the OleControl object on the form.
>
>So once again - what should be done to prevent this behaviour from the ActiveX? How is the activeform property of the application object set?