Recommended Posts

Hi Forum. I'm trying to do the standard center the window on a desktop when the DB first opens.

The problem I am having is if I shrink the db window down to a small size, then close the db, when I reopen the window won't center unless I run the script twice, or change the script to have 2 Move/Resize script steps-the first to make the window the size I want, and the second to center.

I feel like I'm probably doing something simply wrong. I attached the script that works. I also attached the file=Admin, no P/W. The file is set with OnFirstWindowOpen script trigger where the resize and move are all in one step.

To replicate the behavior, open the db, manually resize the db to a small window, close then reopen.

You are also not accounting for the full width and height of the window. You are dividing it in half.

Also, another consideration or 3:

Some users want that file to open in the same place they left it. You may want to account for that.

Do any users work on a resolution of less than 989 x 1620?

I like to push the centering of windows into a utility script that I can pass in as parameters the dimensions I want. That way I can just call that script, pass in the dimensions as parameters and use that script anywhere.

This DB is only for my use so just one resolution to consider. If I shrink the db window and close the database, then, if I use the script pictured to open the file, it works fine. If I take the same script, remove line 3, and put the size along with the top and left parameters into just one script step, it won't work.

It only works by setting the size in one script step, then setting top and left in the next.

I just wanted to know if the script shown is correct and/or how to correct it.