QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: hanness on September 24, 2021, 12:48:06 pm

Title: Is it possible to lock the console size?
Post by: hanness on September 24, 2021, 12:48:06 pm
I have a program that runs entirely in a console windows. All input and output happens within that console window. Is it possible to prevent a user from resizing that window? It appears that the $RESIZE:OFF metacommand does not work with the console window.
Title: Re: Is it possible to lock the console size?
Post by: FellippeHeitor on September 24, 2021, 01:00:29 pm
$Resize has no effect in the console at all, as you've noticed.

You may want to use the Width command in your main loop - won't prevent your user from resizing, but will restore back to what you wish to impose.

Zach may have an API call for that.
Title: Re: Is it possible to lock the console size?
Post by: hanness on September 24, 2021, 01:35:30 pm
Thanks. I do size the windows initially, but I shell some commands that can take 10+ minutes so it would be awkward to have to wait that long for the check of the size again.