Introduction to VS Tools

Visual Studio is a complete set of development tools

RAD Tool (Rapid Applivcation Developement)

To create the user interface, drag and drop controls from the toolbox onto the form, place them where the application needs them to run, and double-click the control to add the control’s handler.

Microsoft’s controls and custom controls, which can be purchased at reasonable prices, give programmers an unprecedented pool of well-tested, reusable code that can be used with just a mouse click.

Create the Winform program

Winform, short for WINDOWS Forms, is a single-client technology.

Basic tools for creating traditional WINDOWS applications that provide the user with information, a window that accepts his input, and programs that have a good look and feel.

Typically, Windows Forms applications are generated by adding controls to the form and developing programs that respond to user actions.

Controls: Are relatively independent user interface (UI) elements that display or accept data input.

namespace WindowsForms1
{

    static class Program
    {
        /// <summary>
        ///The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1()); // The form here is usually called the main form}}}Copy the code

Entry point: Main () is still the entry point of the program,

Run the program (F5), first execute the main function in the form, switch the UI interface method:

Double-click form. cs –> Right click in the blank space –> Shift+F7

Create the essence of the form

Using the System. Windows. Forms. The Form class or its derived classes to create. When we drag, we’re actually creating an object.

Reference namespace, how to delete redundant namespace (gray) :

Right click -> Organization -> Delete unnecessary namespaces

Forms are also controls:

Add form: Select item – Add – New Item – Windows Forms

Delete: Select the form — right-click delete

Main form:

The form object created in the Main function is called the Main form of the form application.

This means that when the main form is closed for that year, the entire application is closed.