INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Tips -N- Tricks

How can I lock the position of a screen object by ChrisRChamberlain
Posted: 26 Jul 01

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.

Then:-

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.


Back to Microsoft: Visual FoxPro FAQ Index
Back to Microsoft: Visual FoxPro Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close