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 ?
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.
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.
Winforms and Windows Forms are the same thing. Winforms is the shortened name for Windows Forms.
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.
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.
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.
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
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++.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With