Windows Forms
Encyclopedia
Windows Forms is the name given to the graphical
Graphical user interface
In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...

 application programming interface
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

 (API) included as a part of Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 .NET Framework
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

, providing access to native Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 interface elements by wrapping the extant Windows API
Windows API
The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces available in the Microsoft Windows operating systems. It was formerly called the Win32 API; however, the name "Windows API" more accurately reflects its roots in 16-bit Windows and its support on...

 in managed code
Managed code
Managed code is a term coined by Microsoft to identify computer program code that requires and will only execute under the "management" of a Common Language Runtime virtual machine ....

. While it is seen as a replacement for the earlier and more complex C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

 based Microsoft Foundation Class Library
Microsoft Foundation Class Library
The Microsoft Foundation Class Library is a library that wraps portions of the Windows API in C++ classes, including functionality that enables them to use a default application framework...

, it does not offer a paradigm comparable to Model–View–Controller. Some after-market and third party libraries have been created to provide this functionality. The most widely used of these is the User Interface Process Application Block, which is released by the Microsoft patterns & practices group as a free download that includes the source code for quick start examples.

History & future

Just like Abstract Window Toolkit
Abstract Window Toolkit
The Abstract Window Toolkit is Java's original platform-independent windowing, graphics, and user-interface widget toolkit. The AWT is now part of the Java Foundation Classes — the standard API for providing a graphical user interface for a Java program.AWT is also the GUI toolkit for a...

 (AWT), the equivalent Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

 API, Windows Forms was an early and easy way to provide graphical user interface
Graphical user interface
In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...

 components to the .NET Framework
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

. Windows Forms is built on the extant Windows API and some controls merely wrap underlying Windows components

Windows Forms provides a cross-platform
Cross-platform
In computing, cross-platform, or multi-platform, is an attribute conferred to computer software or computing methods and concepts that are implemented and inter-operate on multiple computer platforms...

 way to design graphical user interfaces. However WinForms is mainly a wrapper around the Windows API
Windows API
The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces available in the Microsoft Windows operating systems. It was formerly called the Win32 API; however, the name "Windows API" more accurately reflects its roots in 16-bit Windows and its support on...

, and some of the methods allow direct access to Win32 callbacks, which are not available in other platforms than Windows.

With the release of .NET 3.0, Microsoft released a second API for rendering GUIs: Windows Presentation Foundation
Windows Presentation Foundation
Developed by Microsoft, the Windows Presentation Foundation is a computer-software graphical subsystem for rendering user interfaces in Windows-based applications. WPF, previously known as "Avalon", was initially released as part of .NET Framework 3.0. Rather than relying on the older GDI...

 (WPF), together with a GUI declarative language called XAML.
However, even though both Windows Forms and WPF offer comparable functionality, Windows Forms has not necessarily been superseded by WPF, but is simply another tool for Windows desktop application that will continue to exist parallel to WPF.

Architecture

A Windows Forms application is an event-driven application
Event-driven programming
In computer programming, event-driven programming or event-based programming is a programming paradigm in which the flow of the program is determined by events—i.e., sensor outputs or user actions or messages from other programs or threads.Event-driven programming can also be defined as an...

 supported by Microsoft's .NET Framework
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

. Unlike a batch program
Batch processing
Batch processing is execution of a series of programs on a computer without manual intervention.Batch jobs are set up so they can be run to completion without manual intervention, so all input data is preselected through scripts or command-line parameters...

, it spends most of its time simply waiting for the user to do something, such as fill in a text box
Text box
A text box, text field or text entry box is a kind of widget used when building a graphical user interface . A text box's purpose is to allow the user to input text information to be used by the program...

 or click a button.

Alternative implementation

Mono
Mono (software)
Mono, pronounced , is a free and open source project led by Xamarin to create an Ecma standard compliant .NET-compatible set of tools including, among others, a C# compiler and a Common Language Runtime....

 is a project led by Xamarin
Xamarin
Xamarin is a company created in May 2011 by the engineers that created Mono, MonoTouch and Mono for Android which are cross-platform implementations of the Common Language Infrastructure and Common Language Specifications ....

 (formerly by Ximian
Ximian
Ximian was a company that provided free software desktop applications for Linux and Unix based on the GNOME platform. Ximian was founded by Miguel de Icaza and Nat Friedman in October, 1999, and was bought by Novell on August 4, 2003...

, then Novell
Novell
Novell, Inc. is a multinational software and services company. It is a wholly owned subsidiary of The Attachmate Group. It specializes in network operating systems, such as Novell NetWare; systems management solutions, such as Novell ZENworks; and collaboration solutions, such as Novell Groupwise...

) to create an Ecma
Ecma International
Ecma International is an international, private non-profit standards organization for information and communication systems. It acquired its name in 1994, when the European Computer Manufacturers Association changed its name to reflect the organization's global reach and activities...

 standard compliant .NET
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

 compatible set of tools.

Mono
Mono (software)
Mono, pronounced , is a free and open source project led by Xamarin to create an Ecma standard compliant .NET-compatible set of tools including, among others, a C# compiler and a Common Language Runtime....

's support for System.Windows.Forms as of .NET 2.0 is announced as complete ; also System.Windows.Forms 2.0 works natively on Mac OS X. However, Windows.Forms is not actively developed on Mono, and full compatibility with .NET is not achieved and is not possible, because WinForms is mainly a wrapper around the Windows API
Windows API
The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces available in the Microsoft Windows operating systems. It was formerly called the Win32 API; however, the name "Windows API" more accurately reflects its roots in 16-bit Windows and its support on...

, and some of the methods allow direct access to Win32 callbacks, which are not available in other platforms than Windows.

See also

  • Microsoft Visual Studio
    Microsoft Visual Studio
    Microsoft Visual Studio is an integrated development environment from Microsoft. It is used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all...

  • ClickOnce
    ClickOnce
    ClickOnce is a Microsoft technology that enables the user to install and run a Windows application by clicking a link in a web page. ClickOnce is a component of Microsoft .NET Framework 2.0 and later, supports deploying applications made with Windows Forms or Windows Presentation Foundation...

  • Abstract Window Toolkit
    Abstract Window Toolkit
    The Abstract Window Toolkit is Java's original platform-independent windowing, graphics, and user-interface widget toolkit. The AWT is now part of the Java Foundation Classes — the standard API for providing a graphical user interface for a Java program.AWT is also the GUI toolkit for a...

     (AWT), the equivalent GUI
    Graphical user interface
    In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...

     application programming interface
    Application programming interface
    An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

     (API) for the Java
    Java (programming language)
    Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

     programming language
  • Visual Component Library
    Visual Component Library
    VCL is a visual component-based object-oriented framework for developing Microsoft Windows applications. It was developed by Borland for use in, and tightly integrated with, its Delphi and C++Builder RAD tools...

    , Borland VCL
  • Visual Test
    Visual Test
    Visual Test, originally known as MS-Test, was an automated testing tool for Windows applications developed by Microsoft and later sold to Rational Software.-Overview:...

    , test automation

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK