Question

I'm working with .NET (specifically Boo, but answers would work in C# too) and I want to know how I could create an editable box inside the command line, such that I could display a section of output in the top part of the command line, and have a one line box at the bottom for input, much like the program irssi (the IRC client) does.

I assume this is possible with .NET, how would I approach this?

Was it helpful?

Solution

You can use Console.SetCursorPosition(Column, Row) to set the cursor to the appropriate position. For your example, use Console.SetCursorPosition(0, Console.WindowHeight-1) to place the cursor at the lower-most row and then let the user enter text.

OTHER TIPS

Isn't what you need a Windows application, with command-line client hosted inside of it?

irssi uses a library called ncurses, but in .Net, the System.Console object provides you with pretty much everything you need to make console-based applications.

Another higher level option would be the mono.curses assembly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top