difference between console and windows form application

difference between console and windows form application for C# in visu

Page 1 of 1

8 Replies - 36883 Views - Last Post: 23 April 2010 - 06:43 PM Rate Topic: -----

#1 Mangesh_m  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 06-August 09

difference between console and windows form application

Post icon  Posted 06 August 2009 - 07:06 AM

what is difference in console and windows form application in C# visual studio 2008? where these are going to used?
Is This A Good Question/Topic? 0
  • +

Replies To: difference between console and windows form application

#2 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1526
  • View blog
  • Posts: 5,961
  • Joined: 21-March 08

Re: difference between console and windows form application

Posted 06 August 2009 - 07:13 AM

Console Applications don't have user interfaces and are run in the Command Prompt. Windows Forms applications do have user interfaces.

That's probably the biggest difference.
Was This Post Helpful? 2
  • +
  • -

#3 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

Reputation: 945
  • View blog
  • Posts: 6,342
  • Joined: 18-October 08

Re: difference between console and windows form application

Posted 06 August 2009 - 07:14 AM

A Windows form application is an application that has a graphical user interface(GUI) like the Visual C# IDE. A console program on the other hand is a text application. There are not fancy controls like buttons or textboxes in a console application and they are run from the command prompt.

*edit*
ecplised4utoo got his answer in first.

This post has been edited by SixOfEleven: 06 August 2009 - 07:34 AM

Was This Post Helpful? 1
  • +
  • -

#4 Guest_rddezh9*


Reputation:

Re: difference between console and windows form application

Posted 22 April 2010 - 11:00 AM

Can I use the same code for console application as in window application. But, when I want to write something, I have to write: Console.Write("My text"); :nervous:
Was This Post Helpful? 0

#5 MentalFloss  Icon User is offline

  • "ADDICTED"[2:5]
  • member icon

Reputation: 528
  • View blog
  • Posts: 1,397
  • Joined: 02-September 09

Re: difference between console and windows form application

Posted 22 April 2010 - 12:17 PM

Quote

Can I use the same code for console application as in window application. But, when I want to write something, I have to write: Console.Write("My text");


You are able to create a windows program that displays a console when ran by right-clicking the project then selecting properties. Then on the "Application" tab, just change "Windows Application" to "Console Application" for the output type. Once that's done, every time you run your application, a console will come up. All of your Console.Write calls will output to this window and the form will still be shown as a windows application.

This is pretty good for debugging at a high level (where you aren't targeting anything specific but just ensuring the proper control flow and such).

Hope this helps.

This post has been edited by MentalFloss: 22 April 2010 - 12:18 PM

Was This Post Helpful? 3
  • +
  • -

#6 ragingben  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 175
  • View blog
  • Posts: 641
  • Joined: 07-October 08

Re: difference between console and windows form application

Posted 23 April 2010 - 08:00 AM

Also it is very good practice to split the UI side of your application (console, windows forms, wpf etc) and the functional side/back end (your class libraries etc) so that you can use a project with differnt UI's.

For example, at work I wrote a robotics control dll in a class library, and then use both a Console application and WPF aplication to interact with the dll in differnt circumstances.
Was This Post Helpful? 1
  • +
  • -

#7 Guest_taylorc8*


Reputation:

Re: difference between console and windows form application

Posted 23 April 2010 - 08:17 AM

haha i'm lmaoing just browsed this board from C++ and someone asked what's a console app?
Was This Post Helpful? -7

#8 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1642
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: difference between console and windows form application

Posted 23 April 2010 - 11:14 AM

@Guest_taylorc8* There's no need to ridicule someone over something they don't know, how would you feel if this happened to you?
Was This Post Helpful? 3
  • +
  • -

#9 poncho4all  Icon User is offline

  • D.I.C Head!
  • member icon

Reputation: 123
  • View blog
  • Posts: 1,405
  • Joined: 15-July 09

Re: difference between console and windows form application

Posted 23 April 2010 - 06:43 PM

@Guest_taylorc8*:
I belive that C++ also has console applications and windows Forms with Visual Studio 2008.
To be more exact when you create a proyect select C++, under CLR there you can find both kinds of application.
A windows form is only a lot of coding time saved for C++ programers, and with alot of new cool tools, and the console application is probably the most common way to learn C++ so I`would think that the person that asked whats a console application, is not really familiarized with this kind of programming vocabulary or his new to programming
Was This Post Helpful? 3
  • +
  • -

Page 1 of 1