Is it possible to write an app that's a console app AND a Windows app?

I want to write an app that acts as a console app most of the time. It will always be passed parameters. But, when I pass it certain parameters, I want it to bring up a window that allows for administration of the app. Is this possible If so, what's the best way to do this. Your help is greatly appreciated.


Answer this question

Is it possible to write an app that's a console app AND a Windows app?

  • owlet

    I think you start a Console App, then in you MyProject page, add a reference to the .NET class System.Windows.Forms

    Then add Forms or Dialogs and call them when needed.

    I'm not an expert...but I think it will work.
    --William

  • hnzl

    Yes, definately. Create a windows app, then in your static void main, add your console code, including code to conditionally start the main form ( you'll start with code that just creates that form ).

    Actually, you may need to create a console app and add forms to it, in order for the console window to come up.



  • Is it possible to write an app that's a console app AND a Windows app?