all groups > dotnet windows forms > june 2006 >
You're in the

dotnet windows forms

group:

Forms Event model


Forms Event model jsh02_nova NO[at]SPAM hotmail.com
6/30/2006 4:12:01 AM
dotnet windows forms: Can someone point me to a document showing the sequence of form events upon
showing?

RE: Forms Event model tlkerns
6/30/2006 4:48:02 AM
See if this helps:

http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.enter.aspx

Tony

[quoted text, click to view]
RE: Forms Event model jsh02_nova NO[at]SPAM hotmail.com
6/30/2006 5:31:02 AM
Thanks for the response. I was actually looking for the document that listed
the matrix of winform control event sequences during its lifecycle.

Thanks anyway.

[quoted text, click to view]
Re: Forms Event model jsh02_nova NO[at]SPAM hotmail.com
6/30/2006 7:32:02 AM
Thanks for the response.

There is a certain sequence during initialization, activation, and disposing.

Upon initialization, after the ctor is called, if the control is a Form
type, can you confirm what I believe the event firing sequence is? i.e.,
Load, HandleCreated, Layout, Paint, ReSize, SizeChanged, Activate,
GotFocus, Shown

Otherwise, I tried to find some time to write a test Form to confirm. I just
thought a document existed somewhere.

thx

[quoted text, click to view]
Re: Forms Event model Stoitcho Goutsev (100)
6/30/2006 9:15:55 AM
Hi,

There is not special lifecycle in windows forms as there is for webforms
application. The reason being is that the mechanism used by web pages for
serving requests and creation and building control hierarchies is more
complex. Web pages has short life where winforms forms once created leave
until they are no longer needed. In other words there is no cycle in their
life, so you won't find such a document.

There are some event sequences, but they are related to a concrete scenarios
e.g. what is the order of events and virtual method calls when an user
presses a keyboard key, moves the mouse, control verification, etc. Maybe if
you are more specific in your question you can find the answer.


--
HTH
Stoitcho Goutsev (100)

Basically
"jsh02_nova@hotmail.com" <jsh02novahotmailcom@discussions.microsoft.com>
[quoted text, click to view]

Re: Forms Event model Mini-Tools Timm
7/3/2006 9:06:02 AM
[quoted text, click to view]

As stated in another response, the order of events can depend on the user's
interaction with the form. However, if you simply open a form then close it
again, the form's events occur in the following order:

Load
Layout
VisibleChanged
Activated
Paint
Closing
Closed
Deactivate

--
Timm Martin
Mini-Tools
..NET Components and Windows Software
AddThis Social Bookmark Button