tags:

views:

217

answers:

3

Hello everyone,

I need write a console application like as hiren boot screen: alt text

User can input a arrow key or a number for choosing. When a menu item is selected, I will fill a background for the selected menu item.

Please give me some guideline or example. Thanks.

+5  A: 

The console class has all the core functionality you need.

To set the cursor to any desired position you can use the Console.CursorLeft or Console.CursorTop properties. A little example is already posted here.

For the colors you can use the Console.BackgroundColor and Console.ForegroundColor.

With these properties you should be able to write all this stuff onto the screen. Afterwards you need to check the user input (KeyUp, KeyDown pressed). This can be done by checking the result of Console.ReadKey() method. By setting the boolean paramter to true you can prevent that the pressed character is displayed on the screen itself.

With this base functionality you should be able to write your own helper class to make all this stuff a little more comfortable.

Oliver
+1  A: 

There are several .NET based NCurses libraries around that make creation of console based interfaces easier:

Oded