Author Topic: Is it possible to lock the console size?  (Read 2844 times)

0 Members and 1 Guest are viewing this topic.

Offline hanness

  • Forum Regular
  • Posts: 210
    • View Profile
Is it possible to lock the console size?
« 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.

FellippeHeitor

  • Guest
Re: Is it possible to lock the console size?
« Reply #1 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.

Offline hanness

  • Forum Regular
  • Posts: 210
    • View Profile
Re: Is it possible to lock the console size?
« Reply #2 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.