>The only way I know to do this is to add code in your base class lostfocus() event that saves itself to a form property.
>
>IF PEMSTATUS(thisform,"olastactivecontrol",5)
> thisform.olastactivecontrol = this
>ENDIF
>
Actually without the test
thisform.addproperty("olastactivecontrol", this)
And don't forget to
thisform.olastactivecontrol=null in form's .destroy(), to avoid having a dangling reference. In one case when I was doing something similar, for some reason storing direct references didn't work, so I used sys(1272, this) instead, with a catch that the first segment of its result is a temporary variable before form's init exits, and isn't too usable afterwards either - to use it, I had to replace it with "thisform.", which worked inside the form.