Windows Forms

Windows Forms

. Some after-market and third party libraries have been created to address this issue. The most widely used of these is the [http://www.microsoft.com/downloads/details.aspx?familyid=98C6CC9D-88E1-4490-8BD6-78092A0F084E&displaylang=en| 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 and future

Just like AWT, the equivalent Java API, Windows Forms was an early and easy way to provide GUI components to the .NET Framework. Also like AWT, it is a thin-wrapper on the underlying Windows platform, and it is difficult to specialize existing components or even to create new ones.Fact|date=August 2008

The Windows Presentation Foundation address these problems by providing a much more platform-independent way of designing Graphical user interfaces. Windows Forms has been in effect superseded by WPF (and its associated GUI declarative language called XAML), leading some to think that, whilst it will still be supported in future .NET releases, no new features would be added to Forms in the future [cite web
url=http://joshsmithonwpf.wordpress.com/2007/09/05/wpf-vs-windows-forms/
title= WPF vs. Windows Forms
first=Josh|last=Smith
date=2007-09-05
accessdate=2008-07-26
] [cite web
url=http://blogs.msdn.com/mharsh/archive/2004/09/20/231888.aspx
title= WPF vs. Windows Forms
first=Mike|last=Harsh
quote="If you’re targeting only Windows XP and Longhorn, Avalon is the way to go. But Windows Forms is still the only way to write managed UI that will run on Win 2K and below"
date=2004-09-20
accessdate=2008-07-26
] [cite web
url=http://www.longhorncorner.com/Blogs/BlogDetail.aspx?BlogId=660
title= Future of Windows Forms and ASP.NET
first=Mahesh|last=Chand
date=2008-05-08
accessdate=2008-07-26
] .

Architecture

A "Windows Forms application" is an event-driven application supported by Microsoft's .NET Framework. Unlike a batch program, it spends most of its time simply waiting for the user to do something like fill in a text box or click a button (control).

"BackgroundWorker" is a utility class. Calling time-consuming code directly from the GUI classes will work, but it will perform in the same thread as the main GUI thread, so if the method needs time to perform, the GUI will freeze during this time. It is useful when a time-consuming task has to be performed following a user-interaction event, as it executes the code in another background thread before returning the result to the main GUI thread (SwingWorker is the equivalent Java class).

Hello world example

The following is a simple C# program using Windows Forms.using System;using System.Windows.Forms;

public class HelloWorld{ public static void Main() { MessageBox.Show("Hello world!");

Alternative implementation

Mono is a project led by Novell (formerly by Ximian) to create an Ecma standard compliant .NET compatible set of tools.

As of 13 May 2008, Mono's System.Windows.Forms 2.0 is API complete (contains 100% of classes, methods etc. in Microsoft's System.Windows.Forms 2.0); also System.Windows.Forms 2.0 works natively on Mac OS XFact|date=July 2008.

ee also

* Microsoft Visual Studio
* ClickOnce
* Abstract Window Toolkit (AWT), the equivalent GUI application programming interface (API) for the Java programming language
* VCL - Borland's Visual Component Library

References

External links

* [http://www.microsoft.com/events/series/windowsforms.mspx MSDN: Building Windows Forms applications]
* [http://msdn2.microsoft.com/en-us/library/dd30h2yb.aspx MSDN : Windows.Forms reference documentation]
* [http://windowsclient.net/ Official community site]
* [http://www.codeproject.com/vb/net/#Windows+Forms Code Project: Windows Forms application samples]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Windows Forms — ist der Name einer Programmierschnittstelle zur Erstellung graphischer Benutzeroberflächen (GUIs). Die API ist Teil des Microsoft .NET Frameworks und bietet Zugriff auf Elemente zur Erstellung von Microsoft Windows Benutzeroberflächen. Dies… …   Deutsch Wikipedia

  • Windows Forms — est le nom de l interface graphique qui est incluse dans .NET Framework, fournissant l accès via du Managed code à l API Windows. Sommaire 1 Complexité d utilisation 2 Implémentation équivalente 3 Exemple de programme source …   Wikipédia en Français

  • Windows Forms — Данный API часть .NET Framework 3.0 Windows Forms название интерфейса программирования приложений (API), отвечающего за графический интерфейс пользователя и являющегося частью Micro …   Википедия

  • Windows Vista — Part of the Microsoft Windows family …   Wikipedia

  • Windows Presentation Foundation — (WPF) (nom de code Avalon) est la spécification graphique de Microsoft .NET 3.0. Il intègre le langage descriptif XAML qui permet de l utiliser d une manière proche d une page HTML pour les développeurs. WPF est pré installé avec Vista. Il est… …   Wikipédia en Français

  • Windows Presentation Foundation — Entwickler Microsoft Aktuelle Version WPF 4 (12. April 2010) Betriebssystem ab Windows XP Service Pack 2 Kategorie GUI Framework …   Deutsch Wikipedia

  • Windows Longhorn — Windows Vista Famille Microsoft Windows Type de noyau Noyau hybride État du proje …   Wikipédia en Français

  • Windows Vista — Famille Microsoft Windows Type de noyau Noyau hybride État du projet Sortie et stable …   Wikipédia en Français

  • Windows Vista Home Premium — Windows Vista Famille Microsoft Windows Type de noyau Noyau hybride État du proje …   Wikipédia en Français

  • Windows Vista SP1 — Windows Vista Famille Microsoft Windows Type de noyau Noyau hybride État du proje …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”