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] "Stoitcho Goutsev (100)" wrote:
> 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>
> wrote in message news:42BAFDE4-397F-490B-9B6E-0289731129D2@microsoft.com...
> > 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.
> >
> > "tlkerns" wrote:
> >
> >> See if this helps:
> >>
> >>
http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.enter.aspx > >>
> >> Tony
> >>
> >> "jsh02_nova@hotmail.com" wrote:
> >>
> >> > Can someone point me to a document showing the sequence of form events
> >> > upon
> >> > showing?
> >> >
> >> > thx
>
>
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] wrote in message news:42BAFDE4-397F-490B-9B6E-0289731129D2@microsoft.com...
> 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.
>
> "tlkerns" wrote:
>
>> See if this helps:
>>
>>
http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.enter.aspx >>
>> Tony
>>
>> "jsh02_nova@hotmail.com" wrote:
>>
>> > Can someone point me to a document showing the sequence of form events
>> > upon
>> > showing?
>> >
>> > thx
[quoted text, click to view] "jsh02_nova@hotmail.com" wrote:
> 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
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