C # program running process

Source: Internet
Author: User

Step 1: Enter static void main ()

Part 2: run application. Run (New form1 () in static void main (); construct the form in the middle.
2.1 run private system. componentmodel. Container components = NULL. The Container class is the default implementation of the icontainer interface. A container is an object that encapsulates and tracks zero or more components. In this context, inclusion refers to logical inclusion, rather than intuitive inclusion. You can use components and containers in multiple scenarios, including visualization and non-visualization solutions. Track the components in the container in the first-in-first-out list. The list also defines the order of the components in the container. The added component is appended to the end of the list.

2.2 execute the form constructor public form1 () to initialize the form
2.2.1 execute initializecomponent () in the constructor. In this function, initialize Windows controls (system. Windows. Forms. Control) and forms.
2.2.2 execute resumelayout (false); resumelayout: when multiple attributes of the control are adjusted, multiple layout events are canceled using the suspendlayout and resumelayout Methods successively. For example, you can call the suspendlayout method first, set the size, location, anchor, or dock attribute of the control, and call the resumelayout (bool) method to make the change take effect. The default value is true to restore the normal layout logic, and false to change the layout.

After the third part is executed, a form is displayed to run the program, wait for the event to occur, and respond to the event.

The fourth part is to close the form. Exit application. Run (which may be equivalent to the Message Loop Mechanism in Windows) function, and the program ends.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.