If it's a Windows program (running in a window), Windows normally remembers the size and position. However, I've seen Windows programs that override that and resize themselves, deliberately, and there's not much you can do except work with the facilities that the programmer provided. Same for "full screen" programs that talk directly to the video hardware. It's not a "generic" issue with a generic solution.