06-05-2024, 10:26 PM
Are you sure the _Delay is necessary in newer versions of QB64-PE? I briefly tested it and it doesn't appear to be, and it really shouldn't be after changes I made in 3.5.0 QB64-PE version. Before 3.5.0 there is a race that would cause it to be zero at the beginning of the program.
The `_WINDOWHANDLE` is not related to the `SCREEN`, changing the `SCREEN` does not change the `_WINDOWHANDLE`. In `3.13.0` this prints a non-zero value on start-up and the same value for all three prints:
I don't think there are any commands that would make the window handle change, but I'd be curious to know what your program is doing before the `SCREEN`, and also what you're using the `_WINDOWHANDLE` for.
The `_WINDOWHANDLE` is not related to the `SCREEN`, changing the `SCREEN` does not change the `_WINDOWHANDLE`. In `3.13.0` this prints a non-zero value on start-up and the same value for all three prints:
Code: (Select All)
Print _WindowHandle
Sleep
Screen _NewImage(640, 480, 32)
_delay 1
Print _WindowHandle
Sleep
Screen 0
_delay 1
Print _WindowHandle
I don't think there are any commands that would make the window handle change, but I'd be curious to know what your program is doing before the `SCREEN`, and also what you're using the `_WINDOWHANDLE` for.