Changing size of Win2k/XP console?

Chris Lambacher lambacck at computer.org
Thu Jul 14 17:22:22 EDT 2005


Referring to the documenation you will have to use that function and
SetConsoleWindowInfo to get the effect you want.  Basically
SetConsoleScreenBufferSize sets the size for the console and
SetConsoleWindowInfo sets the size for the window containing the console.  The
window size can't be bigger that the console size.  If the console size is
bigger than the window, you will end up with scrollbars.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/setconsolescreenbuffersize.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/setconsolescreenbuffersize.asp

You might want the get function as well:
GetConsoleScreenBufferInfo
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/setconsolescreenbuffersize.asp

When in doubt about the Microsoft API see the MSDN.

-Chris



-Chris


On Thu, Jul 14, 2005 at 11:48:09PM +0300, Sheeps United wrote:
> "Peter Hansen" <peter at engcorp.com> wrote in message 
> news:I9-dnekiad4vVUvfRVn-uw at powergate.ca...
> > Which Windows API call did you try using?  Can you show us a line or two 
> > of code that you tried?  Most likely then someone will be able to point 
> > out what went wrong and it will work.  (Chances are that very few here 
> > know the API call required, so by not mentioning it you're severely 
> > limiting the number of answers you are likely to get.)
> 
> No actual code, yet.
> 
> I'm far from sure if it's the right one, but I think it could be 
> SetConsoleScreenBufferSize from Kernel32. Hrr, for some reason I have nasty 
> feeling in back of my head... That could also be totally wrong way of 
> approaching.
> 
> 
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list