I am developing a console application. I need to emulate the way how the command line utility behaves when the F7 button is pressed, like shown below:

Is it possible in C# 2008? If not, is there any workaround available?
Any help much appreciated.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
On Windows there is a whole API for writing “Console Mode” applications. It allows you to listen for mouse or keyboard input in an event driven way, and also to set the text foreground and background colours, position the cursor, etc.
To make a box like the one displayed by CMD.EXE, you use certain special characters to make the border (there are various corner pieces and edge pieces – use the Character Map application to see them all).
To use the Console API from C# you probably need to use pinvoke, e.g.
See the docs for SetConsoleTextAttribute to see how to use it to set the colour.