Hi Sergey
>Does it jump to the second monitor if you run your code from the Command window?
Yes it does but that too is fine as long as I get it onto the other monitor. The difference I found between using -C and -A switches is that -C would not flash the VFP desktop (as per config.fpw) but (now) would not start in the second monitor. -A initially shows the VFP desktop on the first monitor (same as the dev IDE) then it will disappear and as far as the desktop is concerned behave as would in -C but now the Command Window is too there which needs to be closed and things are fine. I don't mind the flash and closing the command window but somehow I will miss the -C
I change to the following code but it seems only the command window is defined as early but the other docked windows are not until later in the app init. Of course I can shift the commented code to the application object. If you have any other suggestions, thanks.
IF FILE("debug.txt")
_VFP.LEFT = (-SYSMETRIC(1)) + 256
ENDIF
IF INLIST(RIGHT(SYS(16,1), 3), "APP", "EXE")
_SCREEN.WINDOWSTATE = WINDOWSTATE_MAXIMIZED
ELSE
HIDE WINDOW "Command"
ENDIF
>BTW, it's better to set _VFP.Left because it represents outer window of VFP Desktop.
Have done that thanks.