0

I'm working on a text based adventure game and would like to have the game run in fullscreen above everything with no scrollbar so it takes up the screen and only the command prompt and text is shown.

I have tried achieving this using Console.SetWindowSize() and DLLImports however these have been unsuccessful in achieving the effect I am after.

Felipe Augusto
  • 7,733
  • 10
  • 39
  • 73
  • I suspect you can't... a normal full-screen game gets a special window handle that cmd.exe isn't set up to utilize. I would suggest utilizing something like WPF that can do the window and then just emulate the console aspect (several MVVM tutorials out there around logs, which is basically the same idea) – BradleyDotNET Aug 09 '18 at 20:26
  • @BradleyDotNET I feel that it would be possible through DLLImport overrides. WPF and WinForms console emulation wouldn't give me the effect I'm after or the perks that comes with a console application such as being able to run it from the command line. – StevenHughes Aug 09 '18 at 20:49
  • 1
    https://github.com/Thraka/SadConsole and https://gamedev.stackexchange.com/questions/29908/text-based-game-in-xna There is really no need to stick to `Console` class. – Lex Li Aug 09 '18 at 20:49
  • @Phenomenal You can feel its possible all you want, that doesn't mean it *is* possible. Two people so far are indicating that yours is the wrong approach. Also, you can certainly run GUI apps from the command line – BradleyDotNET Aug 09 '18 at 20:53
  • @BradleyDotNET GUI apps cannot be run _inside_ the command line. My aim revolves around using the windows console itself and I accept that it may not be possible to do what I am after but two people disagreeing shouldn't be considered indication of this fact. – StevenHughes Aug 09 '18 at 20:59
  • Sure, just trying to save you some time. I could be wrong and you may well get a good answer. I'm quite curious about the supposed "perks" and "effects" of a console app though. You may want to consider asking about how to gain those in a GUI application if it turns out this is in fact impossible. – BradleyDotNET Aug 09 '18 at 21:00
  • Thanks for the advice and good faith. – StevenHughes Aug 09 '18 at 21:21
  • see my answer in [this stackoverflow post](https://stackoverflow.com/questions/4423085/c-sharp-full-screen-console/72596493#72596493) – TechDogLover OR kiaNasirzadeh Jun 12 '22 at 23:15

0 Answers0