Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. When to choose Windows Application or Console Application

When to choose Windows Application or Console Application

Scheduled Pinned Locked Moved C#
questioncsharpvisual-studiotutorial
5 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    ComCoderCsharp
    wrote on last edited by
    #1

    Hi Guys I am relative new to Visual Studio... I'm about to do some calculations on my data and I was wondering if anybody can tell me the difference between choosing a Windows application or Console application when starting a project and what is the difference. Seems to me, to be easier to implement my algorithms in a console, because it is possible to get the data output in the commando-prompt (don't know how to do this in an application) and later on when designing the GUI I could change it over to an application, is this possible..? Thanks in advance AL

    N E D 3 Replies Last reply
    0
    • C ComCoderCsharp

      Hi Guys I am relative new to Visual Studio... I'm about to do some calculations on my data and I was wondering if anybody can tell me the difference between choosing a Windows application or Console application when starting a project and what is the difference. Seems to me, to be easier to implement my algorithms in a console, because it is possible to get the data output in the commando-prompt (don't know how to do this in an application) and later on when designing the GUI I could change it over to an application, is this possible..? Thanks in advance AL

      N Offline
      N Offline
      Nader Elshehabi
      wrote on last edited by
      #2

      Not good design. That was applicable if the GUI would take a lot of programming, but now in C# all you usually do is drag/drop. you want to display your output. It could be as easy as:

      MessageBox.Show(MyOutputString);

      or

      MessageBox.Show(MyOutputInt.ToString());

      Another way is to show it in a TextBox control:

      MyTextBox.Text = MyOutputString;// or MyOutputInt.ToString()

      You usually make a consol application when you don't need a user interface. e.g. a command line tool. If you will need a user interface, you should start a windows application from the beginning. If you don't know how to make a user interface in C#, learning it would be as easy as reading a comic book. Either grab a book, or screw thing up yourself with the designer till you get it right -I don't think it would be that way-. You can even download some free video tutorials on that from the net.

      Regards:rose:

      1 Reply Last reply
      0
      • C ComCoderCsharp

        Hi Guys I am relative new to Visual Studio... I'm about to do some calculations on my data and I was wondering if anybody can tell me the difference between choosing a Windows application or Console application when starting a project and what is the difference. Seems to me, to be easier to implement my algorithms in a console, because it is possible to get the data output in the commando-prompt (don't know how to do this in an application) and later on when designing the GUI I could change it over to an application, is this possible..? Thanks in advance AL

        E Offline
        E Offline
        Ed Poore
        wrote on last edited by
        #3

        ComCoderCsharp wrote:

        Windows application or Console application

        There is no major difference apart from the fact that in a Console application the console is displayed. In a windows one you can write stuff to the console (standard input / output / error) but nothing will be displayed or read.

        ComCoderCsharp wrote:

        Seems to me, to be easier to implement my algorithms in a console

        It doesn't really matter, displaying the data initially might be easier with a console.

        ComCoderCsharp wrote:

        (don't know how to do this in an application)

        The simplest solution would be to drop a textbox onto the form and append data to that using the TextBox.AppendText method.

        ComCoderCsharp wrote:

        later on when designing the GUI I could change it over to an application, is this possible..?

        Yes, just open the property pages and change the output type to Windows Application rather than console, all this does is change a command-line option when calling the C# compiler.


        I have no idea what I just said. But my intentions were sincere.

        1 Reply Last reply
        0
        • C ComCoderCsharp

          Hi Guys I am relative new to Visual Studio... I'm about to do some calculations on my data and I was wondering if anybody can tell me the difference between choosing a Windows application or Console application when starting a project and what is the difference. Seems to me, to be easier to implement my algorithms in a console, because it is possible to get the data output in the commando-prompt (don't know how to do this in an application) and later on when designing the GUI I could change it over to an application, is this possible..? Thanks in advance AL

          D Offline
          D Offline
          Daniel Grunwald
          wrote on last edited by
          #4

          A Console Application shows the console window while a Windows Application does not. Both a Console Application and a Windows Application can open forms - so you could always use a console application and output logging information on the console (if you don't like Debug.WriteLine). Unlike forms, the console window content will be visible even if your application is not responding. For the release builds, you could then just switch to a Windows Application.

          C 1 Reply Last reply
          0
          • D Daniel Grunwald

            A Console Application shows the console window while a Windows Application does not. Both a Console Application and a Windows Application can open forms - so you could always use a console application and output logging information on the console (if you don't like Debug.WriteLine). Unlike forms, the console window content will be visible even if your application is not responding. For the release builds, you could then just switch to a Windows Application.

            C Offline
            C Offline
            ComCoderCsharp
            wrote on last edited by
            #5

            This really cleared things up - I think I will use an application and view tha data in a gui box all the best Al

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups