+ 1
A Windows form app is an app which has a graphical interface, a Form.
A console application just pop you up the command line, no graphical windows.
You can do it :) just choose the right type when Visual Studio prompt you (if you are using that IDE).
Or import the right packages.
+ 1
In the same language the coding basics will be the same. The different will be the usage of extra graphical classes. For a form (graphical) application you need to import a bunch of graphical packages which help to draw the form on the screen and provide support for other graphical movement. E.g. moving the form, putting elements on the form ( buttons, input fields, pictures) etc.
Which language you are planning to implement it? C#?
+ 1
Sure. Thats why i asked the language. So in c# a console app's code would look like this:
using System;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Please enter your name and press enter");
//write to the console
string name = Console.ReadLine();
//read input from the console till the newline hit
Console.WriteLine("Welcome " + name);
//write to the console using the previous input
Console.ReadKey();
//read one key form the console
}
}
}
i added comments to each line. You can see that it uses the System library only.
I will comment and send an example to a win form app also
+ 1
If you create a windows app (gtaphical) you will use extra graphical classes just like in this example:
using System;
using System.Windows.Forms;
namespace WindowsFormsApplication
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
using System;
using System.Windows.Forms;
namespace WindowsFormsApplication
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button_Enter_Click(object sender, EventArgs e)
{
Label_Welcome.Text = "Welcome " + textBox_Name.Text;
}
}
}
Notice the usage of System.Windows.Forms library.
This form display some text, a textfield to enter a name and a button to make the program greet the user using the entered name.
The previous console app do the same just asking the name from the console.
In a win. form app you usuqlly have 2 classes. One is the program entry point (Program class here), the other is for the form which is displayed and it's elements (buttons, text, form events...) called Form1 here.
Good examples, tutorials for C# can be found on Microsoft's official page:
Console app: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/hello-world-your-first-program
Windows Forms application: https://msdn.microsoft.com/en-us/library/dd492132.aspx
There are many technology used to create forms (e.g. wpf), not just the basic one I gave the example in, but it is a good starting point.
+ 1
Console apps are one thing, graphical apps are a bit different, yes.
Not every software has a grapical interface, think about services, some server side apps. Its good and useful to learn basic graphics but you can stay with the server side as a future work area if you want.
+ 1
Console applications are useful. It gives the basics of every apps. There are many apps running on the compouter without graphical interfaces. And they are interacting with each other, also they can be a part of a graphical client app (or system) as well.
I personally think you should not skipp lessons like this because it is a part if the language and not that separatable. It is the basic lets say, the first step to understand and then can come other complex things like graphics. I would say to build up your knowldge step-by-step taking more difficult topoics. But this is just my opinion.
+ 1
I think it will help to learn it yes.
The question is a bit difficult to answer so i give a similar example.
Its like questioning which is better: To learn driving by a car having a manual or an automatic transmission? If you planning to always drive with an automatic t., then you would probabably need just that. But it is very advised to learn the manual first ( bcs thats the basic) and then move to the automatic. It can happen that you have to rent or use a car and only manual is available. It can happen that you have to create some sort of program that has no graphics as part of implementing a graphical software. Good to have a basic knowledge of it. But it depends on your plans with programming if you need it or not. Till it is just hobby then it is fine how you learn it (you can learn it when you need it). If it is a possible future work purpose, then i would suggest to build up the study on the language by learning the console first then move to one or more of the graphical techiques you like. (form, wpf, aspx, etc)
The core funtions ( when you implement logical functions not the graphics) is the same in both. Just the visualization and interaction with the users is different. E.g. if you implement to summarize two numbers, it will look like the same. If you want to display the result, it will be different.
+ 1
You are welcome 😊