Windows Forms (WinForms) is a graphical (GUI) GRAPHICAL USER INTERFACE class library included as a part of Microsoft .NET Framework, providing a platform to write rich client applications for desktop, laptop, and tablet PCs. While it is seen as a replacement for the earlier and more complex C++ libraries.

Windows Forms

With Windows Forms, applications with a rich graphical user interface are being developed. These applications are easy to develop and update, they can work when they have access to the Internet when they do not, and can access resources on the local computer, ensuring much more security.

Windows Forms has an assortment of controls that can be added to the forms: text controls, buttons, drop-down menus, radio buttons, and more. If there is no control to cover the developer’s needs, Windows Forms offers the ability to create custom controls using the UserControl class.

Below is an example of a simple Windows form application. It shows a simple Login screen, which is accessible by the user. The user will enter the required credentials and then will click the Login button to proceed.

Setting Up The Form


  • BackColor
  • BackgroundImage
  • BackgroundImageLayout


  • MaximizeBox
  • MinimizeBox


  • StartPosition


  • Text
  • Font
  • ForeColor

Event And Event Handling

  • Event handling is familiar to any developer who has programmed graphical user interfaces (GUI).
  • When a user interacts with a GUI control (e.g., clicking a button on a form), one or more methods are executed in response to the above event.
  • Events can also be generated without user interactions.
  • Event handlers are methods in an object that are executed in response to some events occurring in the application.

Source Code

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MY_FIRST_FORM
    public partial class Form1 : Form
        public Form1()

        private void Form1_Load(object sender, EventArgs e)


        private void button1_Click(object sender, EventArgs e)

            label3.Text = textBox1.Text;
            label3.Visible = true;

            //MessageBox.Show("HELLO: " + textBox1.Text);
            //MessageBox.Show("WELCOME TO WINFORMS !!");


Click Below Link to Download Notes Of This Blog

Click Below Link to Download Visual Studio Project / Source Code Of This Blog

Download All Notes Of Winforms From the Link Given Below

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *