Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making UI for console application [closed]

How can I make an interface for console applications to make them look like edit.com under Microsoft's operating systems. Target languages are C, C++ and C#.NET.

MS-DOS Editor

like image 846
David Weng Avatar asked Sep 13 '10 11:09

David Weng


People also ask

How do I make my console application not close?

Try Ctrl + F5 in Visual Studio to run your program, this will add a pause with "Press any key to continue..." automatically without any Console.

How do I close the console application?

Exit a Console Application With the return Method in C# The return statement ends the execution of a method and returns the control to the calling or the main method. We can use the return statement inside the main() function to end our console application's execution.

How do I keep the console open in C#?

Keep Console Open With the Ctrl + F5 Shortcut in C# The best approach for keeping our console window open after the execution of code is to run it with the Ctrl + F5 shortcut of the Microsoft Visual Studio IDE.


2 Answers

That would be based on a very simple framework which writes directly to the video to draw the underlying shadows, drop down menus, etc, not alone that, since 'Edit.com` would be written in assembler for speed in relation to drawing, this is quite ancient by today's standards, you can however take a look at PDCurses which will enable you to do this kind of thing.

The neat beauty is, PDCurses is compatible with the unix equivalent of Curses.

But, really, today, it is all about GUI and Windows....

What kind of application are you trying to do?

IIRC, from my old days, there was an object orientated framework for this using TurboVision, which has a port available with open source now, see this wikipedia entry on this TurboVision.

like image 134
t0mm13b Avatar answered Oct 11 '22 17:10

t0mm13b


Today, console applications are either old DOS applications emulated more and less in Windows, or command-line interpreters. Anyway, if you really want to do an editor, use the System.Console class in the System NameSpace and use the SetCursorPosition method to write what you want where you want

like image 33
Stephane Halimi Avatar answered Oct 11 '22 18:10

Stephane Halimi