Keep Window Maximized

I want my main screen to be NOT maximized when app opens, but if they maximize it then I want to store that as a preference and keep it maximized. However, if I close a file for example, my window keeps going back to the small version even though I am calling Me.Maximize before the end of the file close.

Is this problem something to do with FullScreen? What is the difference between FullScreen and Maximize?

Why not compare window.width and screen.width , and window.height and screen.height.
If the same then window is maximized. But effectivly. When you set the size of a window to the screensize, it’s not like if use click the maximize button because nothing will happen if click not maximize.

I want to stick with what happens when user clicks the maximize button.

My problem is that maximize button click works. But when other events happen in my app the window goes “un-maximized” without user intentionally clicking that button. So for instance when a person closes a data file it goes un-maximized, even though I have code that says if they have the maximized setting set then keep it maximized… when I step thru that the window is maximized but when it returns out of that menu method the window goes un-maximized and I can’t figure out why.

Just a thought but are you calling the window’s Restore method somewhere? Or, more likely, the Restore event is being called from somewhere.