Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between win32 application, windows form application and console application?

I want to know what is the difference between windows form application, win32application ana console, i know that both the windows form application and win32 application is gui tool, but i want to know when to use one over the other one, and could I convert console application to windows form application ?

like image 321
sara Avatar asked Dec 15 '13 08:12

sara


People also ask

What is the difference between Windows form application and console application?

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.

What is a Win32 console application?

Windows application A Win32 program is an executable application (EXE) written in C or C++, using calls to the Win32 API to create a graphical user interface. You cannot add MFC or ATL support to a Windows application.

What is difference between Winforms and Windows Forms?

Winforms and Windows Forms are the same thing. Winforms is the shortened name for Windows Forms.

What is the difference between console and GUI application?

A user typically interacts with a console application using only a keyboard and display screen, as opposed to GUI applications, which normally require the use of a mouse or other pointing device.

What are console apps on PC?

An application that uses the command line for input and output rather than a graphical interface (GUI). For example, utility programs that perform a single function or that run in the background are often written as console apps.

What is the difference between console and desktop in Visual Studio?

the console app can run as system service without a GUI, so without an user logged in to his desktop. A console application has built-in functionality for obtaining command line options, you need to use declares to get the same functionality from a GUI application.


2 Answers

Windows Form refers to a .NET application. It's not based directly on the native Windows API, but instead on the .NET infrastructure. Which includes a virtual machine.

Win32 generally refers to the 32-bit Windows API. However, the _WIN32 macro is defined for both 32-bit and 64-bit programming. As a Visual Studio project type it includes both GUI and console subsystem API-level programs.

A Windows subsystem is a small integer value in the executable's header that tells Windows what kind of services this program needs. This value can be inspected via e.g. Microsoft's dumpbin program, e.g. dumpbin c:\windows\notepad.exe /headers | find "ubs". In Windows 9x the dumpbin output was available via the file preview functionality, but that feature was discontinued.

Each process in Windows can be associated with one, and at most one, console window.

GUI subsystem means that Windows will NOT attempt to outfit each instance with an associated console window. The process can however create a console window itself. Usually this subsystem is used for ordinary programs with a graphical user interface (hence, "GUI"), and with most linkers it's specified as "windows".

Console subsystem means that Windows will attempt to outfit each instance with an associated console window, creating a new one if necessary.

Note that

  • The same source code can be built as console or GUI subsystem. And that's extremely easy to do. Just change the subsystem specification.

  • A GUI subsystem executable has standard streams, just as a console subsystem executable has.

  • A console subsystem executable can present a graphical user interface, just as a GUI one can.

Also note that

  • Microsoft's tools will by default not accept a standard C++ main for a GUI subsystem build. However, this non-conforming behavior is easy to fix. Just specify /entry:mainCRTStartup in the linker options.

There is no such problem with the GNU tools, that is, g++.

like image 139
Cheers and hth. - Alf Avatar answered Oct 18 '22 17:10

Cheers and hth. - Alf


  1. windows form applications are applications that use the graphical programming interface frameworks such as .NET, DELPHI, or MFC instead of directly calling the win32 API.
  2. On the other hand, win32 application usually deals directly with windows api to create applications from bottom up.
  3. And console applications don't have any graphical interface. Only command line window is used for data input and result output.
like image 45
richard.g Avatar answered Oct 18 '22 15:10

richard.g