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 [color blue]FOXUSER.dbf[color black] to mark them as read-only.
To avoid manually searching through possibly hundreds of records, in the command window:-
[color blue]
SET RESO OFF
USE path\FOXUSER.dbf IN 0 EXCLUSIVE
SELE FOXUSER
INDEX ON FOXUSER.updated
SET ORDER TO TAG updated
GO BOTT
BROW
[color black]
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 [color blue]FOXUSER.id[color black] field, [color blue]TTOOLBAR[color black] being toolbar, [color blue]REPORTPOS[color black] being report position etc.
Change the FOXUSER.readonly value(s) from [color blue].F.[color black] to [color blue].T.[color black], and this will "lock" the object in the last position.
Then:-
[color blue]
DELE TAG updated
USE IN FOXUSER
[color black]
This is a better technique than making the whole [color blue]FOXUSER.dbf[color black] readonly, because if you do so, [color blue]FOXUSER.dbf[color black] will not save the coordinates, etc of the objects you do want to resize, reposition etc.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.