Windows Forms

Windows Forms

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 geschieht durch Wrappen der existierenden Windows API in Managed Code. Im Rahmen des Mono-Projekts steht Windows Forms weitgehend auch unter Linux und Mac OS X zur Verfügung.

Inhaltsverzeichnis

Vergleich zu anderen Programmierschnittstellen

Windows Forms ersetzt die frühere, komplexere Microsoft Foundation Class Library, die auf der Programmiersprache C++ basiert. Kritisiert wird, dass das Framework nicht dem Paradigma Model View Controller folgt. Einige Bibliotheken anderer Anbieter bieten jedoch die hierzu notwendigen Funktionalitäten an – am meisten genutzt wird der „Process Application Block“[1], eine Bibliothek, die von Microsofts Entwicklergruppe patterns & practices zum freien Download zur Verfügung gestellt wurde. Er enthält den Quellcode der Kernbibliothek und Beispiele, die den Einstieg erleichtern sollen. Die Microsoft-Nachfolge-GUI zu Windows Forms ist die Windows Presentation Foundation, welche eine stärkere Trennung der grafischen Oberfläche vom Programmcode, und ähnlich Html ein dynamischeres Layout ermöglicht.

Hallo Welt-Beispiel

Nachfolgend ein einfaches C#-Programm, das die Windows Forms-Bibliothek benutzt.

using System;
using System.Windows.Forms;
 
public class HalloWelt
{
   [STAThread]
   public static void Main()
   {
      Form form = new Form();
      Button b = new Button();
      b.Text = "Klicken!";
      b.Click += (s,e)=>{MessageBox.Show("Geklickt!");};
      form.Controls.Add(b);
      form.Show();
      Application.Run(form);
   }
}

Siehe auch

Weblinks

Einzelnachweise

  1. User Interface Process Application Block for .NET

Wikimedia Foundation.

Игры ⚽ Поможем сделать НИР

Schlagen Sie auch in anderen Wörterbüchern nach:

  • 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 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… …   Wikipedia

  • 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”