| Subject: | MainForm.Left and MainForm.Top properties problem |
| Posted by: | Sven Pran (no.dire…@mail.please) |
| Date: | Sat, 28 Feb 2009 |
In some of my applications I save the MainForm.Left and MainForm.Top
property values during MainForm.FormDestroy so that the next time the
applicaction is started I can position the mainForm at the same location
where it was when closed down last time. (I read the saved values and use
them to set the Left and Top property values in my MainForm.FormCreate
procedure)
This has always worked fine, except sometimes in one of my applications, an
application that I now start automatically during logon. Often, but not
always the MainForm becomes located too high and/or too far left on the
monitor, I guess with something like 20 to 25% too low values for the Top
and/or Left properties.
I have verified that the cause is not varying sizes of the Monitor, this is
constant at 1440X900 all the time. I have also verified that the saved
values from "last time" were correct when this has happened.
I have not verified if the incorrect position property values are always the
same; what I have verified is that there is no apparently interesting
relation between the incorrect and the desired values.
If somebody can enlighten me what possibly can cause this error when my
application is started from the "Startup" folder I should be very
interested. The error never happens when I start the application after
logon.
regards Sven