05-06-2022, 11:19 PM
Apologies for so many questions. Unfortunately, there are just some things I cannot seem to figure out on my own :-)
Let's assume a create a screen like this:
I allow the user to resize the screen, but I want to restrict them from making the windows smaller than 400 x 400. That part I can do. I simply check the width and height after resizing the screen and if either width or height is less than 400 I change it to 400.
My concern is that while the user is dragging a corner of the screen to resize it, they can drag it to a point where it causes my program to crash while they are still dragging the corner but before I can check it and resize it. See the screenshot below for an example.
Put another way, I can check the size of the screen AFTER they have resized it, but I can't prevent them from dragging the corners to a ridiculously small size that causes a crash. Is there any way to prevent this?
Let's assume a create a screen like this:
Code: (Select All)
oldimage& = handle&
handle& = _NewImage(Horizontal, Vertical, 256)
Screen handle&
_FullScreen _Off
_FreeImage oldimage&
I allow the user to resize the screen, but I want to restrict them from making the windows smaller than 400 x 400. That part I can do. I simply check the width and height after resizing the screen and if either width or height is less than 400 I change it to 400.
My concern is that while the user is dragging a corner of the screen to resize it, they can drag it to a point where it causes my program to crash while they are still dragging the corner but before I can check it and resize it. See the screenshot below for an example.
Put another way, I can check the size of the screen AFTER they have resized it, but I can't prevent them from dragging the corners to a ridiculously small size that causes a crash. Is there any way to prevent this?