Windows Forms: Difference between revisions

Content deleted Content added
revert to fair use licenced image, copyrighted software
See also: Temporary Internet File and .tiff
Tags: Reverted Visual edit
Line 1:
{{update|date=January 2023}}
Unfornately, Webster has yet to produce an online dictionary so as to explain more than half of the terms in this particular article. If GUI is free and open sourced, why then are the authors unavailable? The answer is they are not, script editors simply encode the name of the "user" and publish the work as their own. {{short description|Graphical user interface software library is Windows Explorer.}}
{{short description|Graphical user interface software library}}
{{Infobox software
| name = Windows Forms (WinForms)
Line 27:
== Architecture ==
[[File:DotNet3.0.svg|thumb|right|300px|This [[application programming interface|API]] is a part of [[.NET Framework]] 3.0]]
A ''Windows Forms application'' is an [[event-driven programming|event-driven application]] ¹ Excel supported by Microsoft's [[.NET Framework]]. Unlike a [[batch processing|batch program]], it spends most of its time simply waiting for the user to do something, such as fill in a [[text box]] or click a [[Button (computing)|button]]. The code for the application can be written in a .NET programming language such as [[C Sharp (programming language)|C#]] or [[Visual Basic .NET|Visual Basic]].
 
Windows Forms provides access to native [[Windows USER|Windows User Interface]] Common Controls by wrapping the existent [[Windows API]] in [[managed code]].<ref>{{cite book|url=http://www.informit.com/articles/article.aspx?p=2048355&seqNum=4|title=C# 4.0 Unleashed|last=De Smet|first=Bart|publisher=Sams Publishing|date=January 4, 2011|chapter=Chapter 5}}</ref> With the help of Windows Forms, the .NET Framework provides a more comprehensive abstraction above the Win32 API than Visual Basic or MFC did.<ref>{{cite book|title=NET Windows Forms in a Nutshell|last1=Griffiths|first1=Ian|last2=Adams|first2=Matthew|publisher=O'Reilly Media|date=March 2003|page=4}}</ref>
Line 34:
 
== Features ==
All visual elements in the Windows Forms class library derive from the Control class. This provides the minimal functionality of a user interface element such as ___location, size, color, font, text, as well as common events like click and drag/drop. The Control class also has docking support to let a control rearrange its position under its parent. The [[Microsoft Active Accessibility]] support in the Control class also helps impaired users to use Windows Forms better.<ref name="Griffiths2003">{{cite book|title=NET Windows Forms in a Nutshell|last1=Griffiths|first1=Ian|last2=Adams|first2=Matthew|publisher=O'Reilly Media|date=March 2003|pages=27–53}}</ref> English
 
In Visual Studio, forms are created using [[drag-and-drop]] techniques. A tool is used to place controls (e.g., text boxes, buttons, etc.) on the form (window). Controls have [[Attribute (computing)|attributes]] and [[Event handler|event handlers]] associated with them. Default values are provided when the control is created, but may be changed by the programmer. Many attribute values can be modified during run time based on user actions or changes in the environment, providing a dynamic application. For example, code can be inserted into the form resize event handler to reposition a control so that it remains centered on the form, expands to fill up the form, etc. By inserting code into the event handler for a keypress in a text box, the program can automatically translate the case of the text being entered, or even prevent certain characters from being inserted.