Monthly Archive for February, 2008

Using Console in Windows Forms Applications

I’m currently working on a Windows Application that can be executed as a Forms as well as a Console Application. In this program I’m using the well-known Console.WriteLine() statements to log some stuff to the command prompt when running in console mode. Well, I know there is a much better way e.g. log4net but in this case it’s a sufficient solution.

When I ran the application via the console I was wondering ’cause Console.WriteLine() wrote nothing to the command prompt. Of course, the program is a Windows Application and there’s no plan for a console window. And that’s the cause why Console.WriteLine() is “disabled”.

But finally you can simply “enable” the console window by calling the Win32 API function AttachConsole / FreeConsole. All information for this purpose can be found at pinvoke.net.

Karnevalsumzug in Kempenich 2008

Soeben hat mir David einen tollen Link geschickt: Die Original Goldbach-Musikanten zum 1. Mal im Internet-Fernsehen bei MyVideo :)

Bei so vielen Nebenjobs…

…hat man halt keine Zeit die Klamotten zu wechseln:

McDonalds

Oder: Das aktuelle Karnevalskostüm der Goldbach-Musikanten :)