12-17-2023, 10:32 PM
(This post was last modified: 12-17-2023, 10:33 PM by TerryRitchie.)
(12-17-2023, 10:05 PM)SMcNeill Wrote: And knowing that, you might want to change your code to:Good point!
Code: (Select All)SUB RemoveImage (Image AS LONG)
IF Image < -1 THEN ' does an image exist?
_FREEIMAGE Image ' yes, remove the image from RAM
Image = -1 ' reset the associated image variable, but don't use 0 as it's a valid handle in many cases
END IF
END SUB
(12-17-2023, 10:03 PM)SMcNeill Wrote: https://qb64phoenix.com/qb64wiki/index.php/FREEIMAGE <-- How's that look?
Yep, perfect.