473,398 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Why is my Console Application limiting itself to half the screen?

I have a Console Application, and when I do a "Start Without Debugging" to
test it, everything works, but it will not allow me to make the window wider
than half my screen. Even if I maximize it, it takes the full height, but
only half the width. This is very annoying, because sometimes lines are
longer than half the screen. Why is this, and is there any way to allow me
to make it take up the whole screen? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Oct 28 '08 #1
9 5332
Change the window properties to 132 columns. The width is probably maxed
out at 80 columns.

"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:e1**************@TK2MSFTNGP04.phx.gbl...
>I have a Console Application, and when I do a "Start Without Debugging" to
test it, everything works, but it will not allow me to make the window
wider than half my screen. Even if I maximize it, it takes the full height,
but only half the width. This is very annoying, because sometimes lines are
longer than half the screen. Why is this, and is there any way to allow me
to make it take up the whole screen? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Oct 28 '08 #2
Where would I go to change this?
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Family Tree Mike" <Fa************@ThisOldHouse.comwrote in message
news:On**************@TK2MSFTNGP04.phx.gbl...
Change the window properties to 132 columns. The width is probably maxed
out at 80 columns.

"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:e1**************@TK2MSFTNGP04.phx.gbl...
>>I have a Console Application, and when I do a "Start Without Debugging" to
test it, everything works, but it will not allow me to make the window
wider than half my screen. Even if I maximize it, it takes the full
height, but only half the width. This is very annoying, because sometimes
lines are longer than half the screen. Why is this, and is there any way
to allow me to make it take up the whole screen? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Oct 28 '08 #3
Right click on the console window's title bar and select properties. It
should be on the layout tab, shown as window size.

"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:uV**************@TK2MSFTNGP04.phx.gbl...
Where would I go to change this?
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Family Tree Mike" <Fa************@ThisOldHouse.comwrote in message
news:On**************@TK2MSFTNGP04.phx.gbl...
>Change the window properties to 132 columns. The width is probably maxed
out at 80 columns.

"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:e1**************@TK2MSFTNGP04.phx.gbl...
>>>I have a Console Application, and when I do a "Start Without Debugging"
to test it, everything works, but it will not allow me to make the window
wider than half my screen. Even if I maximize it, it takes the full
height, but only half the width. This is very annoying, because sometimes
lines are longer than half the screen. Why is this, and is there any way
to allow me to make it take up the whole screen? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Oct 28 '08 #4
That feature is no longer availabe in Vista.

"å¼*克鹸" wrote:
alt + enter to solve the problem.
Oct 29 '08 #5
In addition to what Mike suggested, you can set the window Width and Height
of your Console at start up:

Console.WindowWidth = Console.LargestWindowWidth
Console.WindowHeight = Console.LargestWindowHeight

This will ensure that your Console takes up the whole working area and is
similar to what PowerShell does.

--
Stanimir Stoyanov
http://stoyanoff.info

"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:e1**************@TK2MSFTNGP04.phx.gbl...
>I have a Console Application, and when I do a "Start Without Debugging" to
test it, everything works, but it will not allow me to make the window
wider than half my screen. Even if I maximize it, it takes the full height,
but only half the width. This is very annoying, because sometimes lines are
longer than half the screen. Why is this, and is there any way to allow me
to make it take up the whole screen? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Oct 29 '08 #6
That trick ROCKS!

I altered slightly, to get 90%

Console.WindowWidth = (Console.LargestWindowWidth * 9 / 10);

Console.WindowHeight = (Console.LargestWindowHeight * 9 / 10);

Thanks!!

"Stanimir Stoyanov" <st******@REMOVETHIS.live.comwrote in message
news:2E**********************************@microsof t.com...
In addition to what Mike suggested, you can set the window Width and
Height of your Console at start up:

Console.WindowWidth = Console.LargestWindowWidth
Console.WindowHeight = Console.LargestWindowHeight

This will ensure that your Console takes up the whole working area and is
similar to what PowerShell does.

--
Stanimir Stoyanov
http://stoyanoff.info

"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:e1**************@TK2MSFTNGP04.phx.gbl...
>>I have a Console Application, and when I do a "Start Without Debugging" to
test it, everything works, but it will not allow me to make the window
wider than half my screen. Even if I maximize it, it takes the full
height, but only half the width. This is very annoying, because sometimes
lines are longer than half the screen. Why is this, and is there any way
to allow me to make it take up the whole screen? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Oct 29 '08 #7


"sloan" <sl***@ipass.netwrote in message
news:#X**************@TK2MSFTNGP02.phx.gbl...
That trick ROCKS!

I altered slightly, to get 90%

Console.WindowWidth = (Console.LargestWindowWidth * 9 / 10);

Console.WindowHeight = (Console.LargestWindowHeight * 9 / 10);
Or you could have used:

Console.WindowWidth = Console.LargestWindowWidth * 0.9
Console.WindowHeight = Console.LargestWindowHeight * 0.9

:D It's math. Multiple ways to do the same thing :)
hth,
Mythran
Oct 29 '08 #8

You should have tested your code dude:

Error 1 Cannot implicitly convert type 'double' to 'int'. An explicit
conversion exists (are you missing a cast?)

That's where I came up with the * 9 / 10 ...


"Mythran" <My*****@community.nospamwrote in message
news:7F**********************************@microsof t.com...
>

"sloan" <sl***@ipass.netwrote in message
news:#X**************@TK2MSFTNGP02.phx.gbl...
>That trick ROCKS!

I altered slightly, to get 90%

Console.WindowWidth = (Console.LargestWindowWidth * 9 / 10);

Console.WindowHeight = (Console.LargestWindowHeight * 9 / 10);

Or you could have used:

Console.WindowWidth = Console.LargestWindowWidth * 0.9
Console.WindowHeight = Console.LargestWindowHeight * 0.9

:D It's math. Multiple ways to do the same thing :)
hth,
Mythran


Oct 29 '08 #9


"Michael B. Trausch" <mi**@trausch.uswrote in message
news:20081029203203.15b43689@zest...
On Wed, 29 Oct 2008 19:19:36 -0400
"Michael B. Trausch" <mi**@trausch.uswrote:
>Also, it's not very portable; Windows is the only system where the
"console" has any notion of how large it can become on the given
display.

Furthermore (I should have mentioned this in my last post), setting the
Console width and height will throw System.NotSupportedException on
non-Windows platforms, i.e., using Mono. Not sure what Microsoft's
Rotor does on non-Windows platforms, but I suspect it would do the same
thing since there is no way to change the terminal size without the
user doing it manually.

--- Mike

--
My sigfile ran away and is on hiatus.
http://www.trausch.us/
Aye, thanks for the info/correction :)

Mythran
Oct 30 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Reinier Beeckman | last post by:
I have made a simple console application which run through the Windows scheduled task. When the program is starten i get the console in the screen. Is it also possible to configure it that the...
5
by: Barry Mossman | last post by:
Hi, can I detect whether my class is running within the context of a Console application, vs say a WinForm's application ? also does anyone know whether the compiler or runtime is smart enough...
2
by: Tee | last post by:
Hi, I am using System.Diagnostics.Process to start a console application, but I don't want the user to see a "black" screen when the console application is running, how can I hide it? Thanks,...
1
by: Manoj Nair | last post by:
Hi, In a console application is there a way to change the screen size to full screen when an application is running programatically. Pressing Ctrl + atl changes it to full screen can this be...
3
by: inpreet | last post by:
I am trying to build a console application in C#.Net. This application is suppose to run in background without user interaction. How can I hide console to appear?
0
by: Maxwell | last post by:
Hello, I recently completed a MC++ (VS2003) DLL that wraps a non MFC C++ DLL and need to use it in a MC++ Console Application (no forms/guis of any kind just output to console). Trouble is...
1
by: nojetlag | last post by:
Hi there, I have a .Net Console Application (C#) that I have to use for sending email, along this process I do call the App with several parameters. So suddenly I got an error "is not a valid...
4
by: =?Utf-8?B?QWxleGFuZGVy?= | last post by:
Hi! I am new to C#. I read two C# books in the last two days which only covered the basics. And now I am on my third day. The books were really bad, because they did not cover windows applications,...
9
by: Nathan Sokalski | last post by:
I have a Console Application, and when I do a "Start Without Debugging" to test it, everything works, but it will not allow me to make the window wider than half my screen. Even if I maximize it,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.