How do I create this box in the console?
Page 1 of 110 Replies - 737 Views - Last Post: 14 April 2012 - 03:01 PM
#1
How do I create this box in the console?
Posted 14 April 2012 - 12:32 PM
http://s1267.photobu...urrent=cbox.jpg
My class hasn't ever explained how to create such a thing, we just got into object oriented programming just barely. My guess would be to do a bunch of console.WriteLines, but It wouldn't look like the one my teacher wants in the exe. here-
http://debryro.tc.uv...ject10/p10.html
Any pointer to what I could do would be very helpful! Thanks.
Replies To: How do I create this box in the console?
#2
Re: How do I create this box in the console?
Posted 14 April 2012 - 12:44 PM
Quote
Good guess. Why would it not look like the one in the tiny reduced screen shot that is hard to see? That one looks like it is in a console. Therefore it can be done with writeline. Programmers did this sort of thing with writeline for decades before graphical interfaces. it was called DOS.
What have you tried so far to accomplish this part? Can we see your code to do this?
#3
Re: How do I create this box in the console?
Posted 14 April 2012 - 12:56 PM
#4
Re: How do I create this box in the console?
Posted 14 April 2012 - 01:01 PM
#5
Re: How do I create this box in the console?
Posted 14 April 2012 - 01:16 PM
This post has been edited by tlhIn`toq: 14 April 2012 - 01:19 PM
#6
Re: How do I create this box in the console?
Posted 14 April 2012 - 01:16 PM
rickster26ter, on 14 April 2012 - 01:56 PM, said:
The bar character on a keyboard is meant to have a space between lines.
You need to build the box shapes using ASCII characters
http://www.asciitable.com/
This post has been edited by tlhIn`toq: 14 April 2012 - 01:23 PM
#7
Re: How do I create this box in the console?
Posted 14 April 2012 - 01:29 PM
#8
Re: How do I create this box in the console?
Posted 14 April 2012 - 01:36 PM
At least make an effort on your now that you have a direction.
Then come back to this thread with your code if you are still having trouble.
#9
Re: How do I create this box in the console?
Posted 14 April 2012 - 02:12 PM
static void Main()
{
Console.SetWindowSize(85, 45);
Console.WriteLine("╒═════════════════════════════════════════════════════════════════════════════╗");
Console.WriteLine("│FluffShuffle Electronics 14 Apr, 2012 ║");
Console.WriteLine("│ ║");
Console.WriteLine("│ ║");
Console.WriteLine("│ ║");
Console.WriteLine("│ ║");
Console.WriteLine("│ ║");
Console.WriteLine("│ ║");
Console.WriteLine("│ ║");
Console.WriteLine("│ ║");
Console.WriteLine("│ ║");
Console.WriteLine("│ ║");
Console.WriteLine("│ ║");
Console.WriteLine("│ ║");
Console.WriteLine("│ ║");
Console.ReadLine();
}//End Main()
#10
Re: How do I create this box in the console?
Posted 14 April 2012 - 02:28 PM
#11
Re: How do I create this box in the console?
Posted 14 April 2012 - 03:01 PM
For example you could define a method WriteUnderlined, that writes a string to the console and a bunch of line-characters on the row below it, by writing the string, then setting the cursor position to one row below the position the cursor was at before you wrote the string, and then write a bunch of line-characters (where "a bunch" means "as many as the string you wrote is long").
|
|

New Topic/Question
Reply



MultiQuote




|