Is _WINDOWHANDLE working properly?
#3
(08-17-2023, 08:53 PM)Dav Wrote: You've encountered an old issue with QB64 where a slight delay needs to be added after creating the screen so the _WINDOWHANDLE will return correctly.  I forget the exact reason, but just that adding a small _DELAY fixes it.

Add a _DELAY .25 right after scetting the SCREEN call and it should work.

EDIT: I tried using 'Do: Loop Until _ScreenExists' in the past, you may find it in some of my posted code, but I've found that it doesn't always do the trick, so I went back to adding a _delay .25 which never fails.

- Dav
Yep, that took care of it. Thanks Dav Smile

Perhaps a note in the Wiki under _WINDOWHANDLE about this bug and how to overcome it may be appropriate.
Software and cathedrals are much the same — first we build them, then we pray.
QB64 Tutorial
Reply


Messages In This Thread
RE: Is _WINDOWHANDLE working properly? - by Dav - 08-17-2023, 08:53 PM
RE: Is _WINDOWHANDLE working properly? - by TerryRitchie - 08-17-2023, 09:10 PM
RE: Is _WINDOWHANDLE working properly? - by Dav - 08-17-2023, 09:37 PM
RE: Is _WINDOWHANDLE working properly? - by Dav - 08-17-2023, 10:09 PM
RE: Is _WINDOWHANDLE working properly? - by Dav - 08-18-2023, 01:14 PM
RE: Is _WINDOWHANDLE working properly? - by Dav - 08-18-2023, 03:29 PM
RE: Is _WINDOWHANDLE working properly? - by Dav - 08-18-2023, 04:47 PM



Users browsing this thread: 6 Guest(s)