>Hi,
> I have MDIforms in my Top Level Form. I place my toolbar in my top level form to call the relevant function for edit, save and so on function. I face a problem that, _SCREEN.ACTIVEFORM doesn't return the reference of the form even that are only 2 forms in screen - Top level form and one of my MDIform. VFP give me error "ACTIVEFORM is not an object.".
> I use _screen.formcount, it return 2. Again I need to click the form by myself in order _Screen.activeform return the object reference. I have tried to issue myform.setfocus and myform.activate, but it still not work.
>Anybody has any ideas?
John,
Try _SCREEN.Forms(1).SetFocus()
of course make sure _screen.FormCount is greater than 0 when you do this.