O
Oenone
I'm writing an application that I'd like to be able to use both as a Windows
Forms application, and also as a Console application.
If the app is started with no parameters, it should display its window and
allow the user to interact with it. If parameters are provided, it should
instead run as a console application and should output various information
to the standard output channel (so that the output can be redirected if
required).
By setting my app as a Windows Application, all Console methods are ignored.
By setting my app as a Console Application, all attempts to display Windows
Forms are ignored.
Is there any way to get a single application to act in both of these
different ways?
Thanks,
Forms application, and also as a Console application.
If the app is started with no parameters, it should display its window and
allow the user to interact with it. If parameters are provided, it should
instead run as a console application and should output various information
to the standard output channel (so that the output can be redirected if
required).
By setting my app as a Windows Application, all Console methods are ignored.
By setting my app as a Console Application, all attempts to display Windows
Forms are ignored.
Is there any way to get a single application to act in both of these
different ways?
Thanks,