C
C#2y ago
kiran

❔ fullscreen console

is there a way i can make the console fullscreen? like Console.windowheight = fullscreen; or something does that exist?
11 Replies
chilldog
chilldog2y ago
you want it to be full screen when you run the app? i would just add a suggestion to user to fullscreen window,
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Jester
Jester2y ago
ShowWindow(GetConsoleWindow(), SW_MAXIMIXED); might work but you will have to dll import those functions (this is windows only btw)
Jester
Jester2y ago
GetConsoleWindow function - Windows Console
Retrieves the window handle used by the console associated with the calling process.
Jester
Jester2y ago
even the documentation warns it might not work note BOOL is an int not a bool and HWND is IntPtr
Jester
Jester2y ago
DllImportAttribute Class (System.Runtime.InteropServices)
Indicates that the attributed method is exposed by an unmanaged dynamic-link library (DLL) as a static entry point.
WhiteBlackGoose
No, bc it depends on the terminal console application doesn't spawn a terminal you can spawn your own and then you will be able to control it but it won't be as much "console" app then console application only has stdout as its output ofc you can hack around and try to find the window which is being used as terminal but what if the user uses tmux? it's a console app spawning other consoles or not using terminal at all? just pipes the output into something
Jester
Jester2y ago
yeah you wont be able to fullscreen that
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server