08-01-2022, 10:07 PM
(08-01-2022, 07:49 PM)SMcNeill Wrote: A simpler demo of the resize breaking:
Code: (Select All)Screen _NewImage(1024, 720, 32)
$Resize:On
_Delay .2: clearFlag = _Resize 'Comment this line out and watch as _RESIZE triggers with our initial screen creation event
Do
If _Resize Then
RW = _ResizeWidth: RH = _ResizeHeight
If RW < 640 Then RW = 640
d = _Display
Screen _NewImage(RW, RH, 32)
_FreeImage d
' _Delay .2: clearFlag = _Resize 'if it's needed above, it should be needed hear to clear our manual resize
Print _Width, _Height, RW, RH
End If
_Limit 30
Loop
About this demo...
it is clear that the QB64's keyword _RESIZE (function) works like _MOUNSEINPUT activating _ResizeWidth and _ResizeHeight...
so these last functions refresh their values only if a _RESIZE call has been done before them.
....
as the code has been written the user cannot resize the window width under 640 pixels....but the real width is 120 while for height there i s low limit, so if you drag title bar beyond the lower edge of the window, it crashes.