Hi experts,
how can a running program determine its own type?
I'm working on an in-house software that is basically a console application. Its use case is to be called from within another software system, do something and return a return value.
It's outputting some stuff to the console, which helps tracking down erronuous behaviour. But since it's called that often, the console window constantly popps into view and quickly vanishes. Users complain about the flickering on their screens.
Setting the project output type to "Windows Forms" eradicates that problem (no window is created), but also prevents from a quick look at the help screen, which is printed to the console like everything else.
I now would like to branch the help screen output to console in Console mode, or to a window in Forms mode.
Any idea where I could get that information from?