Change Default Window

I want to be able to programmatically set the Default Window that is to open when my app starts up. In the App object, there’s a setting in the inspector to set the default Window. How do you do that programmatically? There is no DefaultWindow property and I can’t find what else would set it.

I want to read a setting saved by the user and depending on what they set, I want to change which window is shown when the app opens. Obviously, I could set DefaultWindow to none and then put in the commands to open the Window object of my choice at the end of the App.Open event. Is that the best way to do it?

Yes, this.