I have a program that very occasionally exhibits a strange behaviour when
activated automatically during logon to a Vista user account. The program
decides during its initialization where to position its main window on the
monitor screen, a process that has never failed when it is started manually
or when it is started on one of my machines running 95, 98 or XP.
But when I have this program listed in the "Startup" folder so that it is
started automatically during logon by a user on my Vista machine the program
window occasionally appears in the position assigned at compile time instead
of the position calculated and set by my initialization routine in the
program.
Information that might be relevant:
The machine has dual core CPU and is running Vista Home premium. I have my
systems fully updated and there is absolutely no indication of any malware
on my machine. My programming language is Delphi 2007, the positioniing
routine is included in a separate procedure executed after the main form has
been completely created and before the application is started (Between the
"Application.CreateForm" and the "Application.Run" statements in the dpr
file).
A very long shot is that timing problems during logon can have something to
do with this behaviour (if the logon process is multithreaded with Windows
and Applications running in separate threads), but I cannot say that I have
much faith in such an explanation.
(And yes, I know that the positioning routine has executed successfully so
the incorrect positioning must have been made after the Delphi runtime
system has completed the initialization.)
But I am very interested in comments if anybody recognises the situation?
regards Sven
|