Hi,
I have a windows form application that can be called from the console using parameters so it doesn't open the forms. Now I want to write log messages to the console when something goes wrong. How do I do this? Further, if the application wasn't called from the console (so it works in graphical mode) I want to open a new console if an error happens and write the log messages into it. How do I detect if the app was called from the console or directly using the icon on the desktop?
Thx in advance.
Micky
I have a windows form application that can be called from the console using parameters so it doesn't open the forms. Now I want to write log messages to the console when something goes wrong. How do I do this? Further, if the application wasn't called from the console (so it works in graphical mode) I want to open a new console if an error happens and write the log messages into it. How do I detect if the app was called from the console or directly using the icon on the desktop?
Thx in advance.
Micky