You already have this answer in a previous entry (answer):
remove the line
Var ReadWindow As New MainWindow
Instead of asking question at each stage of your project developement, do your home work: read the tutorials, check the examples, read the Language Reference, read the “ Introduction to Xojo Programming Book” book.
You will not have to wait for answers that are… pure bet (guess).
Of course, if after doing your home work you have troubles, ask.
IMHO.
In my experience, memory works far more efficiency after searching vs getting an answer.
I guess MainWindow is your Default Window, you either change that to None or do not create a new window and use MainWindow (without the var NewWindow) and change your code to use MainWindow instead:
And with:
var NewWindow As New MainWindow
you are creating another window.
If you are going to create NewWindow based on MainWindow you may want to change the ‘Implicit Instance’ to False (you can review the docs about implicit instance):