Hi Robert,
You should always check for type('_VFP.ActiveForm.ActiveControl.name') = 'C' before attempting to use code involving it. Add this check in front of that code to avoid the error.
>Greg,
>
>I downloaded your class and it seems to be exactly what I am looking for (Thanks!). However, I am sometimes getting the following error:
>
>"Member ACTIVECONTROL does not evaluate to an object" The debugger opens at the following line of code:
>
>
>lcPos = TRANSFORM(lnCursorX)+","+TRANSFORM(lnCursorY) ;
> +","+TRANSFORM(MROW("",3))+","+TRANSFORM(MCOL("",3));
> +","+transform(_vfp.ActiveForm.Name) ;
> +","+TRANSFORM(_vfp.ActiveForm.ActiveControl.Name)
>
>
>This error only seems to occur only when I return to the VFP9 after working in another application window for a while. If the VFP program remains the active application, I don't seem to see the error. Have you got any idea how I can eliminate this error?
>
>TIA,
>Robert
If it's not broken, fix it until it is.
My Blog