Windows Forms

Windows Forms is the name of a programming interface for creating graphical user interfaces ( GUIs). The API is part of the Microsoft. NET Framework and provides access to elements for creating Microsoft Windows user interfaces. This is done by wrapping the existing Windows API in managed code. As part of the Mono project Windows Forms is largely under Linux and Mac OS X as well.

Compared to other programming interfaces

Compared to Microsoft Foundation Classes ( MFC), C based on the programming, the introduction to programming with Windows Forms is easier. The framework is not based on the paradigm of Model View Controller (MVC ). Some third party libraries, however, offer to the requisite functionalities - is most often used the "Process Application Block ", a library that was provided by Microsoft's patterns & practices group of developers for free download. It contains the source code of the core library and examples to help you get started.

With. NET Framework 3.0 is an alternative to Windows Forms has been provided by Microsoft, the Windows Presentation Foundation, which allows a greater separation of the graphical interface of the program code, and aid of XAML, an XML - based language, a dynamic layout.

Hello World Example

Below is a simple C # program that uses Windows Forms.

Using System; using System.Windows.Forms;   public class Hello World {     [ STAThread ]     public static void Main ()     {        Form form = new form ();        Button b = new Button ();        b.Text = "Click ";        b.Click = (s, e) = > { MessageBox.Show ( "Button clicked! ");};        form.Controls.Add (b);        Form.Show ();        Application.Run (form);     } } see also

  • Swing ( Java)
  • Visual Component Library (Delphi / C Builder )
825785
de