473,396 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Win Form Events..

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
=============
Nov 16 '05 #1
2 1862
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
Nov 16 '05 #2
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
=============
"Marcin Grzębski" <mg*******@taxussi.spam.com.stop.pl> wrote in message
news:c6***********@mamut.aster.pl...
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

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Richard Cornford | last post by:
I am interested in hearing opinions on the semantic meaning of FORM (elements) in HTML. I have to start of apologising because this question arose in a context that is not applicable to the...
0
by: jphelan | last post by:
I have a subform that works fine until you import it into a new database when it crashes if you try to open it in either disign or form view. The form, "Attendees_Subform" in my application was...
10
by: Drakier Dominaeus | last post by:
This is my first time posting here, so please forgive me if I do anything incorrectly. I've been learning C# and working with different things and decided I wanted to get into Multi-Threading....
5
by: RAJ | last post by:
hi plz tell me how to know "how window is going to close"... i have to right code for X button of forms... plz telll me thanks bye
5
by: [Yosi] | last post by:
Why I can't catch the Form lost focuse event ? I mad a FORM , I want to print message each time I moved to another application my my desktop . I thryed the following but not work . ...
18
by: Colin McGuire | last post by:
Hi - this was posted last weekend and unfortunately not resolved. The solutions that were posted almost worked but after another 5 days of working on the code everynight, I am not further ahead....
2
by: thomasp | last post by:
Using VB 2005 Beta. I have a form containing a DataGirdView. The cell enter, cell validating, row enter, row validating events have a good bit of code that gets excuted for each of these...
7
by: Miro | last post by:
I can use the property of the Form to remove the "x" from the top of the form. Is there a way in VB to leave the X there but program something so you cannot close the form? Or like an ONCLOSE...
0
by: hmm | last post by:
Hi all I have two problems: Problem #1: I'm using a .NET Form with the property 'FormBorderStyle' set to 'None'. The idea is to completely cover the area of that Form with a UserControl. In...
8
by: hoofbeats95 | last post by:
I don't think this should be this complicated, but I can't figure it out. I've worked with C# for several years now, but in a web environment, not with windows form. I have a form with a query...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.