tags:

views:

144

answers:

1

Hi, I've got something happening with a little app that I made that I don't understand what the problem is. The app is just a little texted panel clock that sits above the taskbar on the second monitor. Settings are saved via inifile in the proper appdata folder, and the specs are saved properly, i.e. X and Y location, font, font style, etc.

I wanted it to run automatically when Windows boots up, so yesterday I just dragged a shortcut to the Start | Programs | Startup folder. This morning when booting up, for a moment, it loaded in the proper location, then quickly moved itself back to 0 by 0 on the X-Y plane. I looked at the inifile, and sure enough... it's Top=1133 Left=1920, just like it is supposed to be, yet windows starts it at Top=0 Left=0.

What the heck?...

+5  A: 

Check that you have the 'position=poDesigned' as well. If you dont, it will use that setting preferentially. If this is ok, put a fixed offset in your X&Y properties to see if that is where it is defaulting to. Ideally you should be setting your desired XY position no earlier than AfterCreation, do it in FormCreate if you can because by that time the form is all yours to play with. Brian.

Brian Frost
Brian, You Da Man!Thanks a bunch, that was it, as I had originally set the position at poDefault. Now I can copy and paste from the clipboard - the date, time, date and time, etc to my hearts content. :)
Bob S