I have written a console application that sets the size of the console and output buffer. My problem is that after the program ends I cannot resize my cmd.exe window the way I did before. After the program sets the size of the window it retains that size no matter what I do afterwards.
+1
A:
It works for me in C#.
namespace CSharpTest
{
class Program
{
static void Main(string[] args)
{
System.Console.WindowHeight = 50;
System.Console.WindowWidth = 100;
System.Console.BufferHeight = 6000;
System.Console.BufferWidth = 100;
}
}
}
After running the program, I can change the height of the window and make it narrower, just like before. I can't make it wider, but then I couldn't before, either.
David Norman
2008-12-02 21:45:41
A:
It is not clear what you mean. But are you setting the default values for all Cmd consoles when you change the size - That would make new cmd consoles that size too.
Could we have a bit more information about what you mean please.
Brody
2008-12-02 23:58:01