Is _WINDOWHANDLE working properly?
#13
_SCREENEXISTS can help catch glitches where you might try and call an API *before* that initial screen is created, but once you have that first screen, it's always going to report a -1 value for you.  A delay could be added to _NEWIMAGE or to SCREEN so that anytime the command is called, the program would automatically wait a moment for everything to be properly registered back in the OS, but I really don't think anyone would like that.

OneScreen = _NEWIMAGE(640,480,32)
TwoScreen = _NEWIMAGE(640,480,32)
DO
    'draw stuff on OneScreen
    SCREEN OneScreen
    'copy and draw stuff on TwoScreen
    SCREEN TwoScreen
LOOP

Would you *really* want a built in delay in those two SCREEN statements?  Those screens already exist.  Is there some true need to add that lag into a program?

Same way with the _NEWIMAGE and _COPYIMAGE commands.  Would they really need a delay to affect things all the time?

It's really only when you're calling out to API calls that you run into the issue you're seeing here.  It's just a basic multi-threading issue at work.

Sometimes, the user just has to be careful of giving things time to run and complete before doing other stuff.  Manual pauses/delays are the best way I see to do this, unless someone else has a better working solution.  Smile
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 SMcNeill - 08-18-2023, 03:44 PM
RE: Is _WINDOWHANDLE working properly? - by Dav - 08-18-2023, 04:47 PM



Users browsing this thread: 8 Guest(s)