I do have an other question. In the original post it was said to put the code in the from.open event. I am using Xojo 2020 R1 and when I look at the list of events for my main form. There isn’t an “open” one listed. So I put this code in the “Activate” event. And while it does make my form open in the center, it also makes it move back to center each time it regains the focus. This isn’t what I want. Only when the form opens.
This is a desktop app, on Windows 10, it is the main form that opens when the app stars
@Jeff_Tullin
When I set the “Placement” property to “Parent Window” then run and open the app for the very, very fist time it is centered. Then if I move the window, close the app and restart, it doesn’t open centered. It opens wherever it was when it was closed.
I may be stupid here, but I can’t find this “Open” event that I have read so much about today.
I click on my from “winMain” to make sure it is current selected. Then I right click and use “Add to Window” ==> Event Handler ==> this is as far as i get I just don’t see “open” listed. I have a screenshot but apparently I can’t add that here. The events are listed in alphabetical order and it goes like this.
Look in the IDE on the left and under the window name expand it and see if that event is already listed
If it is then it has already been added to the window