Win Form Events..

M

Mark Broadbent

Anyone know a simple place that i can reference which winform events are
fired by other events (all of them)? I know the bog standard rules for the
Load Activate etc, looking for a comprehensive but simple reference. For
instance I have just seen that the Layout event is fired by the Resize event
(and other events) and it would be nice not to keep discovering what fires
what by trial and error.

thks.

--

--

Br,
Mark Broadbent
mcdba , mcse+i
=============
 
?

=?ISO-8859-2?Q?Marcin_Grz=EAbski?=

Hi Mark,
Anyone know a simple place that i can reference which winform events are
fired by other events (all of them)? I know the bog standard rules for the
Load Activate etc, looking for a comprehensive but simple reference. For
instance I have just seen that the Layout event is fired by the Resize event
(and other events) and it would be nice not to keep discovering what fires
what by trial and error.

There are protected methods with "On" prefixes that usually fires
events (e.g. OnLoad(...) -> Load)
You can easily override "part" of these methods to find out
their relation.

e.g.

protected override void OnResize(EventArgs e) {
Debug.WriteLine("OnResize - start");
base.OnResize(e);
Debug.WriteLine("OnResize - finish");
}

protected override void OnSizeChanged(EventArgs e) {
Debug.WriteLine("OnSizeChanged- start");
base.OnSizeChanged(e);
Debug.WriteLine("OnSizeChanged- finish");
}

Regards

Marcin
 
M

Mark Broadbent

Thanks Marcin.

I thought of doing something like this. But surely this must be documented
somewhere (maybe MSDN) -I mean the .NET Win Forms team must have some kind
of model to adhere to?



--

--

Br,
Mark Broadbent
mcdba , mcse+i
=============
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top