473,396 Members | 2,151 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Save a forms position

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
2 3603
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Richard Walters | last post by:
hi guys (and girls), Does anyone know how, and indeed if possible to save a forms positions when closed. I have a small Access application and find it annoying having to move the forms into the...
4
by: Patrick De Ridder | last post by:
I have a form1. From it I can select form2. Like so: DataIO MyIO = new DataIO; MyIO.Show(); I want MyIO to appear in a certain position on form1. Say in position (0,0) Which line of code...
2
by: Neil Guyette | last post by:
Hello, All, I'm looking for information on how to create dockable forms. Basically, I'm writing a .NET application and instead of using C# (I want to refresh my C++ skills) I'm going to use...
1
by: JC | last post by:
I'm sure you've all seen the save scroll position from 4 guys from rolla which can be found here > http://aspnet.4guysfromrolla.com/articles/111704-1.aspx BUT try to get that to work AND still be...
7
by: Eric | last post by:
I am trying to save the "last read" position of a file using a StreamReader object. I am reading the lines of the file using StreamReader.ReadLine and then saving the current position in the...
0
by: barbara | last post by:
Hi, all I want to display two child forms in the MDI form at the same time and set one particular one always on the top and another always on the bottom. these two forms both have the same width...
22
by: cj | last post by:
I was googling for a way to have my single form application start in the same location on the screen it was in when it was closed. I found this very short article: ...
1
by: wmbrae | last post by:
I trying to make a javascript document reader in 2 frames. The left frame displays the document, the right frame shows a list of document links. This is as far as I got ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.