If you want to lock a FoxPro screen object such a MODI FILE window, a report preview position or the position of a system, (not your own toolbar class), toolbar, etc, so that they always appear in the same position on screen, try the following:-
Position the object(s) on screen and immediately cancel out of the project.
Now you need to find the relevant record(s) in the FOXUSER.dbf to mark them as read-only.
To avoid manually searching through possibly hundreds of records, in the command window:-
SET RESO OFF USE path\FOXUSER.dbf IN 0 EXCLUSIVE SELE FOXUSER INDEX ON FOXUSER.updated SET ORDER TO TAG updated GO BOTT BROW
By indexing and going bottom, you should then be able to identify the object(s),(they are now the last records in the browse screen), from the FOXUSER.id field, TTOOLBAR being toolbar, REPORTPOS being report position etc.
Change the FOXUSER.readonly value(s) from .F. to .T., and this will "lock" the object in the last position.
DELE TAG updated USE IN FOXUSER
This is a better technique than making the whole FOXUSER.dbf readonly, because if you do so, FOXUSER.dbf will not save the coordinates, etc of the objects you do want to resize, reposition etc.