Is it possible to deactivate resize and maximize gadgets on the Windows console?
I saw this C# solution, but not sure what to do with it (_DeleteMenu doesn't seem to be recognised...?).
Forbidding console resize?
Re: Forbidding console resize?
I can't help you with that, but:
With all these questions about the console lately: It is not designed to be used like a normal window. It is just for spitting out infos and letting other program read them and such. If you need a console with fixed size you better create your own simple one.
With all these questions about the console lately: It is not designed to be used like a normal window. It is just for spitting out infos and letting other program read them and such. If you need a console with fixed size you better create your own simple one.
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
-
GoodNPlenty
- Enthusiast

- Posts: 112
- Joined: Wed May 13, 2009 8:38 am
- Location: Arizona, USA
Re: Forbidding console resize?
This should work.
Code: Select all
Import ""
GetConsoleWindow()
EndImport
If OpenConsole()
hndWnd = GetConsoleWindow()
DeleteMenu_(GetSystemMenu_(hndWnd, #False), #SC_CLOSE, #MF_BYCOMMAND)
DeleteMenu_(GetSystemMenu_(hndWnd, #False), #SC_MINIMIZE, #MF_BYCOMMAND)
DeleteMenu_(GetSystemMenu_(hndWnd, #False), #SC_MAXIMIZE, #MF_BYCOMMAND)
DeleteMenu_(GetSystemMenu_(hndWnd, #False), #SC_SIZE, #MF_BYCOMMAND)
PrintN("Enter to Close")
Input()
EndIf
