473,545 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3620
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******@sympa tico.ca> wrote in message
news:1n******** *************** *****@40tude.ne t...
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
1729
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 right positions on the screen, only to have to do it again when the form is reloaded. Is there anyway to save the position of the form so that it...
4
18280
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 would do the job?
2
1953
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 C++. It would be greatly appreciated if anyone can direct me to online resources or even a good book that gives an overview on how to create dockable...
1
8665
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 able to set the focus to a control. Here's the problem, when you set the focus by using the registerstartupscript method the control gets the...
7
22382
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 file. My problem is that on subsequent reads, the starting position is not correct. I have tried many different ways to increment the file position...
0
857
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 as mdi and half height of mdi(client area). how to do it? Thanks!
22
4928
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: http://blogs.techrepublic.com.com/programming-and-development/?p=540 I can create the my.settings object as specified but I can't set the form1's location to mainformlocation...
1
3088
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 http://www.geocities.com/viewdoq/opening.htm (there are Firefox and Ie, and Ie version incompatiblities and clean-up which I will work on later) Does anybody have one...
0
7434
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7946
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7791
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6026
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3491
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1045
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
744
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.