DCSIMG
Console - Pavel's Blog
Sign in | Join | Help

Pavel's Blog

Pavel is a software guy that is interested in almost everything
software related... way too much for too little time

Browse by Tags

Tip: Using a Console in a GUI Application
11 May 11 02:06 PM | pavely | 4 comment(s)
When working with a WinForms or a WPF application in .NET, a console application is not created by default, so statements involving the Console class normally go to the trash. The console window may be a useful debugging aid, printing anything that may be important during runtime. Fortunately, there is a way to get it back. Actually, there are two ways. The first, the “hard way” is to create the console explicitly using the native AllocConsole function: [ DllImport ( "kernel32" )] private...
Changing Console Fonts
23 July 09 08:43 PM | pavely | 5 comment(s)
The other day I created a Console application and changed some colors and sizes. Then I needed to change the font (programmatically). I looked at the System.Console class – nothing. Maybe they just forgot to wrap it up, I thought, and turned to the Win32 API functions for the Console. Guess what? Nothing. Well, almost nothing. There’s a new function (starting with Vista) called SetCurrentConsoleFontEx , but it’s almost useless. It requires a console font index (which is supposed to be from a console...
תגים:, , ,