Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is _WINDOWHANDLE working properly?
#2
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.

Code: (Select All)
Screen _NewImage(800, 600, 32)
_Delay .25

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 has never failed.

- Dav

Find my programs here in Dav's QB64 Corner
Reply


Messages In This Thread
RE: Is _WINDOWHANDLE working properly? - by Dav - 08-17-2023, 08:53 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: 4 Guest(s)