views:

97

answers:

4

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?

+1  A: 

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

Jon
Well, it *is* possible. It just might be more involved than the OP realizes.
Michael Myers
True. If you make a Windows application, you could do whatever you like with the layout, functionality, etc...
Jon
+1  A: 

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.

John Feminella
+1  A: 

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.

bo
A: 

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

kenny