Reputation: 44728
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?
Upvotes: 2
Views: 1370
Reputation: 56
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.
Upvotes: 1
Reputation: 311645
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.
Upvotes: 1
Reputation: 13727
Isn't what you need a Windows application, with command-line client hosted inside of it?
Upvotes: 1