>Hello
>
>I have a class as form container XXX, inside it I add a couple of activeX and VFP container YYY.
>
>"Thisform" should always point to XXX but when I call it from YYY sometime it give me error NOT AN OBJECT.
>if I replace "Thisform" by "_screen.Activeform" then all is fine. any reason/bug for this behavior???
>
>Another problem which seems like related, in the main program I create a public object from non-visual class
>and I call it oApp, a general application object.
>From a method inside YYY sometime it recognized oApp and othertimes it does not.
>
>Did you have any problem similar to this, and does activeX have anything to do with it??
>
>Thnaks for any help
>Mo
Yes, sometimes an ActiveX can present itself as the "ActiveForm". What you should do is check if the ActiveForm is an object and that it's BaseClass is of type Form. If it's not, check the object's Parent, and see if that's a Form.