Qus:    Explain the life cycle of a Winforms in .net?
Nov 24, 2020 14:17 2 Answers Views: 86 TEJA

1. Move: This event occurs when the form is moved. Although by default, when a form is instantiated and launched, the user does not move it, yet this event is triggered before the Load event occurs.

2. Load: This event occurs before a form is displayed for the first time.

3. VisibleChanged: This event occurs when the Visible property value changes.

4. Activated: This event occurs when the form is activated in code or by the user.

5. Shown: This event occurs whenever the form is first displayed.

6. Paint: This event occurs when the control is redrawn.

7. Deactivate: This event occurs when the form loses focus and is not the active form.

8. Closing: This event occurs when the form is closing.

9. Closed: This event occurs when the form is being closed.

Prev Next
Answers (2)
PARTH Nov 25, 2020 07:59
Answer:   1. Move: This event occurs when the form is moved. Although by default, when a form is instantiated and launched, the user does not move it, yet this event is triggered before the Load event occurs.
2. Load: This event occurs before a form is displayed for the first time.
3. VisibleChanged: This event occurs when the Visible property value changes.
4. Activated: This event occurs when the form is activated in code or by the user.
5. Shown: This event occurs whenever the form is first displayed.
6. Paint: This event occurs when the control is redrawn.
7. Deactivate: This event occurs when the form loses focus and is not the active form.
8. Closing: This event occurs when the form is closing.
9. Closed: This event occurs when the form is being closed.

KRISHNA SWAROOP Nov 25, 2020 08:12
Answer:   The following steps are involved in the life cycle of the winforms in .net
Load: When the form is loaded in into application.
Activate: When the form gets focused when it loads for the first time.
Deactivate: When the form is not focused or minimized or sent to background.
Closing: Before closing the application, this functionality is invoked.
Closed: When application is closed.
Disposed of: Garbage collection performs once the application is closed.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect