ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Programmatically effecting console font colors and size in Delphi console app

<< < (2/3) > >>

app103:
Have you tried following the .net code back to its source? You might find your answers there.

Sometimes the managed way of doing it is similar enough you can translate it back to unmanaged.

kyrathaba:
That's what I'm in the process of doing now.  I'll let you know if I find a solution.  Thanks!

app103:
I was just told the following by a friend:

For Vista and above, there is SetCurrentConsoleFontEx, as already has been said.
For 2K and XP, there is an undocumented function SetConsoleFont; e.g. read here.
here is some code if your fellow can read/translate C
http://stackoverflow.com/questions/1922294/using-unicode-font-in-c-console-app
'HKEY_CURRENT_USER\Console' <--- registry path to alter for saving settings.
"console window how to change font" <-- my google search.

--- End quote ---

kyrathaba:
Thanks, App!  I will try this.

f0dder:
First: please don't even consider changing the default console appearance in the registry in order to achieve something.

Second: can't you just create a shortcut to your .exe and specify the font?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version