Windows Applications Development

• A windows application offers the user interface as GUI. It offers the graphical features like mouse pointer support, colors, labels, buttons, text boxes etc.
• It offers user-friendly and attractive nature, when compared with C.U.I. Applications.
• A windows application is a collection of "windows forms".
Form:
• The graphical component, which can contain the graphical controls like labels, textboxes, buttons, list boxes etc., is called as “Form”. It acts as container for the controls.
• It is also called as a “window”.
• C# recognizes the form as a class.
• Whenever a windows application is created, automatically Visual Studio creates the “Form1”.

Rules for the Form class definition:
• It should be the sub class of "System.Windows.Forms.Form" class.
• It should be defined as a public class.
• It should be defined as "partial" class, as its definition should be written in the following two files.

1) Form1.Designer.cs
Contains the code for designing (Automatically generated code by Visual Studio).
2) Form1.cs
Contains the actual functionality code (Written by the Programmer).
• It should contain a constructor, with a statement called “InitializeComponent();”. This method is created automatically in “Form1.Designer.cs”. This method contains necessary code for creating the controls on the form at run time.

Form Class Definition Syntax:

Windows Applications Development
namespace ProjectName
{
public partial class FormName : Form
{
public FormName()
{
InitializeComponent();
}
}
}