Now here's a little oddity which you guys might want to make note of, if you're ever going to write a program which removes the window's title:
Honestly, I don't have a clue what the heck is going on here! To start with, we make a screen.... Then we remove the title and border... So far, so good...
Then we enter the do loop with an initial value of 0 for TRY, so we attempt to _SCREENMOVE _MIDDLE endlessly...
And, at this point, the window then centers itself for a nanosecond or two, only to then pop down to my bottom right corner of my screen where it stays until the next call to _SCREENMOVE _MIDDLE. Inside the loop, this produces a sickening flicker as the screen jumps back and forth endlessly.
BUT....
Then you hit the SPACE BAR and the value of TRY toggles. We execute a simple _DISPLAY command... And NOW our window stays in the center, regardless of if we ever hit the spacebar again, or not.
Without the _DISPLAY, the window loses itself and doesn't know where the heck to pop, going to the bottom corner rather than the center of the screen.
My initial impression is (and this might be completely wrong):
I have a feeling that QB64 (or GLUT) has internal variables which track our various pieces of screen information (x and y position, size, ect..), and this information doesn't update until a call to _DISPLAY is made. By removing the title bar, we've changed some of the Windows-side value of these things, but not the QB64-side of stuff. GLUT, or Windows, or whatever has one value for the middle of the screen (as seen by how it first positions itself in the correct position), but our internal variables have a different position (as seen by how it moves to the second position).
All this time, I've been telling folks that there's a race condition in handles going on when a screen is first created, so they need to place a small delay before making a screenmove call; when instead, it might be this issue with variables not updating until _DISPLAY is called.
Note that the following works perfectly and places the screen in the middle of our display as it should:
Whereas this doesnt:
The only difference in the two? The use of _DISPLAY before _SCREENMOVE. :P