By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,224 Members | 1,130 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,224 IT Pros & Developers. It's quick & easy.

Save a forms position

P: n/a
hi guys (and girls),

Does anyone know if there is a way to save the position of a form at
runtime. I am developing a small access application and the forms keep
reappearing in the preset position not where the users move them to. I know
you can change the centre property, move the form and then save it and it
will reopen in that position, but I would like to allow the users to choose
the locations of their forms. Is there a way of coding and storing the
values of the screen locations so that the next time the form is opened
these locations are read.

Maybe a long shot, I have spent several hours searching this one, maybe I
haven't looked in the right places or maybe it just isn't possible, but
anyway, someone please put my mind at rest.....

Many thanks for any help given.....

Regards

Richard Walters

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Sat, 21 Feb 2004 23:09:18 -0000, Richard Walters wrote:
...Is there a way of coding and storing the
values of the screen locations so that the next time the form is opened
these locations are read.

Maybe a long shot, I have spent several hours searching this one, maybe I
haven't looked in the right places or maybe it just isn't possible, but
anyway, someone please put my mind at rest.....

Many thanks for any help given.....

Regards

Richard Walters


The simplest thing to do is to create either a table that stores this type
of user options/settings, or to use an external resource such as the
registry or an ini file. In either case, when the form opens (Open or Load
event), you query where the setting is kept and use DoCmd.MoveSize to place
and/or resize the form accordingly. When the form is closed (Close event),
write the new position/size (form Left and Top properties) to where you are
storing it.

--
Mike Storr
www.veraccess.com
Nov 12 '05 #2

P: n/a
Mike,

Thamks for your pointers. I now have an application that stored the forms
locations in a table so that the users can choose the location of the forms.

Many Thanks

Richard Walters

"Mike Storr" <st******@sympatico.ca> wrote in message
news:1n****************************@40tude.net...
On Sat, 21 Feb 2004 23:09:18 -0000, Richard Walters wrote:
...Is there a way of coding and storing the
values of the screen locations so that the next time the form is opened
these locations are read.

Maybe a long shot, I have spent several hours searching this one, maybe I haven't looked in the right places or maybe it just isn't possible, but
anyway, someone please put my mind at rest.....

Many thanks for any help given.....

Regards

Richard Walters
The simplest thing to do is to create either a table that stores this type
of user options/settings, or to use an external resource such as the
registry or an ini file. In either case, when the form opens (Open or Load
event), you query where the setting is kept and use DoCmd.MoveSize to

place and/or resize the form accordingly. When the form is closed (Close event),
write the new position/size (form Left and Top properties) to where you are storing it.

--
Mike Storr
www.veraccess.com

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.