none
Change font size in console window app

    Question

  • Ohla everybody,

    Is there a way to programmatically change the font size of a console window? I know that you can right click on the window's button in the taskbar and click on properties.... but is there a way to do it on a per-application, per-use basis, and do it programmatically?

     

    Thanks in advance for any help!

    Kevin Schaefer


    Kevin Schaefer "The world is round and the place which may seem like the end may also be the beginning"
    Thursday, May 20, 2010 4:57 AM

Answers

All replies

  • You can try SetConsoleTextAttribute API to achieve this.
    Thursday, May 20, 2010 7:24 AM
  • I looked it up on msdn, and i think that the SetConsoleTextAttribute would only let me change the color of the text and background color, and some other stuff, but it doesnt seem to contain anythink to let me change the size of the text

     

    Thanks


    Kevin Schaefer "The world is round and the place which may seem like the end may also be the beginning"
    Thursday, May 20, 2010 5:16 PM
  • Then you can try with looking at the following registry key.

    HKLM\Software\Microsoft\WindowsNT\CurrentVersion\Console\

    http://powershell.com/cs/blogs/ebook/archive/2008/10/20/chapter-1-the-powershell-console.aspx#figure1.6

    • Proposed as answer by Cor LigthertMVP Friday, May 21, 2010 5:58 AM
    • Marked as answer by kevdog114 Friday, May 21, 2010 10:08 PM
    Friday, May 21, 2010 5:10 AM
  • I looked at that registry key entry, but it doesnt seem to include any way of setting properties for a single console app. HOWEVER!, i searched the registry for the filename of the console app and found another key:

    HKEY_USERS\S-1-5-21-424096983-3908262648-2086383041-1000\Console\

    This one seems to contain a list of any customized console apps in it. Now all i gotta do is figure out how to modify the hexadecimal values!

     

    Thanks for the help!


    Kevin Schaefer "The world is round and the place which may seem like the end may also be the beginning"
    Friday, May 21, 2010 10:08 PM