Introduction
.NET Framework is a popular technology that supports the building and running of Windows apps and web services. It provides a code-execution environment that minimizes software deployment and versioning conflicts. It eliminates the performance problems of scripted environments and allows users to develop different types of Windows-based and Web-based apps comfortably. The recent versions of .NET have introduced many changes to the standard application templates, including the Windows Forms templates for C#. Let's discuss Windows Forms in detail.
Recommended topics, Palindrome in C# and Ienumerable vs Iqueryable
Windows Forms
Windows Forms was the original GUI framework for .NET. It is an easy UI framework for building rich client applications for Windows. This development platform supports various app development features such as controls, graphics, user input and many more. It creates only desktop-based apps that can access the local hardware and file system of the computer where it is running. Visual Studio enables users to create Windows Forms apps using a drag-and-drop graphic designer.
Using Forms as Dialog Boxes
Windows Forms are commonly used to create dialog boxes that interact with the user. Dialog boxes range from simple text boxes to elaborate forms with many controls. Dialog boxes display notification messages to the user. They have one or more buttons to dismiss the dialog box. The Windows operating system provides a message box control, a specialised dialog box that simplifies the task of displaying a simple text message to the user. The .NET Framework wraps the Windows message box in the MessageBox class.
Using Forms as Views
Windows Forms applications also include child windows and views that allow interaction between the user and the application. A significant difference between views and dialog boxes is that views usually don’t have button controls to dismiss the form. The Show() and Close() methods display and close a view.